diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ccdconfig/Makefile | 6 | ||||
-rw-r--r-- | sbin/ccdconfig/ccdconfig.c | 37 | ||||
-rw-r--r-- | sbin/init/init.c | 12 | ||||
-rw-r--r-- | sbin/newfs/Makefile | 5 | ||||
-rw-r--r-- | sbin/newfs/newfs.c | 22 | ||||
-rw-r--r-- | sbin/newlfs/Makefile | 5 | ||||
-rw-r--r-- | sbin/newlfs/newfs.c | 21 |
7 files changed, 23 insertions, 85 deletions
diff --git a/sbin/ccdconfig/Makefile b/sbin/ccdconfig/Makefile index ab042b3283e..13f6e1f9d63 100644 --- a/sbin/ccdconfig/Makefile +++ b/sbin/ccdconfig/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 1995/08/17 16:37:17 thorpej Exp $ +# $NetBSD: Makefile,v 1.2 1996/05/16 07:11:17 thorpej Exp $ PROG= ccdconfig MAN= ccdconfig.8 @@ -6,7 +6,7 @@ MAN= ccdconfig.8 BINGRP= kmem BINMODE=2555 -DPADD= ${LIBKVM} -LDADD= -lkvm +DPADD= ${LIBKVM} ${LIBUTIL} +LDADD= -lkvm -lutil .include <bsd.prog.mk> diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index 3c6fe5415e8..1fbc6b79150 100644 --- a/sbin/ccdconfig/ccdconfig.c +++ b/sbin/ccdconfig/ccdconfig.c @@ -1,5 +1,5 @@ -/* $OpenBSD: ccdconfig.c,v 1.3 1996/03/21 00:15:24 niklas Exp $ */ -/* $NetBSD: ccdconfig.c,v 1.5 1996/02/28 01:01:18 thorpej Exp $ */ +/* $OpenBSD: ccdconfig.c,v 1.4 1996/05/22 11:34:48 deraadt Exp $ */ +/* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -55,6 +55,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <util.h> #include <dev/ccdvar.h> @@ -98,8 +99,6 @@ static int do_io __P((char *, u_long, struct ccd_ioctl *)); static int do_single __P((int, char **, int)); static int do_all __P((int)); static int dump_ccd __P((int, char **)); -static int getmaxpartitions __P((void)); -static int getrawpartition __P((void)); static int flags_to_val __P((char *)); static int pathtodevt __P((char *, dev_t *)); static void print_ccd_info __P((struct ccd_softc *, kvm_t *)); @@ -626,36 +625,6 @@ print_ccd_info(cs, kd) } static int -getmaxpartitions() -{ - int maxpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_MAXPARTITIONS; - varlen = sizeof(maxpart); - if (sysctl(mib, 2, &maxpart, &varlen, NULL, 0) < 0) - return (-1); - - return (maxpart); -} - -static int -getrawpartition() -{ - int rawpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_RAWPARTITION; - varlen = sizeof(rawpart); - if (sysctl(mib, 2, &rawpart, &varlen, NULL, 0) < 0) - return (-1); - - return (rawpart); -} - -static int flags_to_val(flags) char *flags; { diff --git a/sbin/init/init.c b/sbin/init/init.c index d0788c6826e..96b3bc1caa2 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $NetBSD: init.c,v 1.21 1995/10/05 06:11:24 mycroft Exp $ */ +/* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -46,7 +46,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93"; #else -static char rcsid[] = "$NetBSD: init.c,v 1.21 1995/10/05 06:11:24 mycroft Exp $"; +static char rcsid[] = "$NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $"; #endif #endif /* not lint */ @@ -65,6 +65,7 @@ static char rcsid[] = "$NetBSD: init.c,v 1.21 1995/10/05 06:11:24 mycroft Exp $" #include <time.h> #include <ttyent.h> #include <unistd.h> +#include <util.h> #ifdef __STDC__ #include <stdarg.h> @@ -79,13 +80,6 @@ static char rcsid[] = "$NetBSD: init.c,v 1.21 1995/10/05 06:11:24 mycroft Exp $" #include "pathnames.h" /* - * Until the mythical util.h arrives... - */ -extern int login_tty __P((int)); -extern int logout __P((const char *)); -extern void logwtmp __P((const char *, const char *, const char *)); - -/* * Sleep times; used to prevent thrashing. */ #define GETTY_SPACING 5 /* N secs minimum getty spacing */ diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile index 8f987dc77cb..bf7d243f8a1 100644 --- a/sbin/newfs/Makefile +++ b/sbin/newfs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 1995/03/18 14:58:37 cgd Exp $ +# $NetBSD: Makefile,v 1.10 1996/05/16 07:13:01 thorpej Exp $ # @(#)Makefile 8.2 (Berkeley) 3/27/94 PROG= newfs @@ -9,6 +9,9 @@ MOUNT= ${.CURDIR}/../mount CFLAGS+=-DMFS -I${MOUNT} .PATH: ${MOUNT} ${.CURDIR}/../disklabel +DPADD= ${LIBUTIL} +LDADD= -lutil + LINKS= ${BINDIR}/newfs ${BINDIR}/mount_mfs MLINKS= newfs.8 mount_mfs.8 newfs.8 mfs.8 diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index 6fdaf7d90a9..9f6cef21b1c 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: newfs.c,v 1.19 1995/06/28 02:21:02 thorpej Exp $ */ +/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */ /* * Copyright (c) 1983, 1989, 1993, 1994 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.8 (Berkeley) 4/18/94"; #else -static char rcsid[] = "$NetBSD: newfs.c,v 1.19 1995/06/28 02:21:02 thorpej Exp $"; +static char rcsid[] = "$NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $"; #endif #endif /* not lint */ @@ -69,6 +69,7 @@ static char rcsid[] = "$NetBSD: newfs.c,v 1.19 1995/06/28 02:21:02 thorpej Exp $ #include <string.h> #include <syslog.h> #include <unistd.h> +#include <util.h> #if __STDC__ #include <stdarg.h> @@ -90,8 +91,6 @@ void fatal(const char *fmt, ...); void fatal(); #endif -int getmaxpartitions __P((void)); - #define COMPAT /* allow non-labeled disks */ /* @@ -681,21 +680,6 @@ fatal(fmt, va_alist) /*NOTREACHED*/ } -int -getmaxpartitions() -{ - int maxpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_MAXPARTITIONS; - varlen = sizeof(maxpart); - if (sysctl(mib, 2, &maxpart, &varlen, NULL, 0) < 0) - fatal("getmaxpartitions: %s", strerror(errno)); - - return (maxpart); -} - usage() { if (mfs) { diff --git a/sbin/newlfs/Makefile b/sbin/newlfs/Makefile index ccf83c7436e..929101505c5 100644 --- a/sbin/newlfs/Makefile +++ b/sbin/newlfs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 1995/03/18 14:58:45 cgd Exp $ +# $NetBSD: Makefile,v 1.6 1996/05/16 07:17:49 thorpej Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 PROG= newlfs @@ -6,4 +6,7 @@ SRCS= dkcksum.c lfs.c lfs_cksum.c misc.c newfs.c MAN= newlfs.8 .PATH: ${.CURDIR}/../../sys/ufs/lfs ${.CURDIR}/../disklabel +DPADD= ${LIBUTIL} +LDADD= -lutil + .include <bsd.prog.mk> diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c index ef7d9be96ec..2668ff6cab0 100644 --- a/sbin/newlfs/newfs.c +++ b/sbin/newlfs/newfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $ */ +/* $NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $ */ /*- * Copyright (c) 1989, 1992, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.3 (Berkeley) 4/22/94"; #else -static char rcsid[] = "$NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $"; +static char rcsid[] = "$NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $"; #endif #endif /* not lint */ @@ -69,6 +69,7 @@ static char rcsid[] = "$NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $" #include <ctype.h> #include <string.h> #include <paths.h> +#include <util.h> #include "config.h" #include "extern.h" @@ -119,7 +120,6 @@ char *progname, *special; static struct disklabel *getdisklabel __P((char *, int)); static struct disklabel *debug_readlabel __P((int)); static void rewritelabel __P((char *, int, struct disklabel *)); -static int getmaxpartitions __P((void)); static void usage __P((void)); int @@ -432,21 +432,6 @@ rewritelabel(s, fd, lp) #endif } -static int -getmaxpartitions() -{ - int maxpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_MAXPARTITIONS; - varlen = sizeof(maxpart); - if (sysctl(mib, 2, &maxpart, &varlen, NULL, 0) < 0) - fatal("getmaxpartitions: %s", strerror(errno)); - - return (maxpart); -} - void usage() { |