diff options
Diffstat (limited to 'sbin/newfs')
-rw-r--r-- | sbin/newfs/Makefile | 5 | ||||
-rw-r--r-- | sbin/newfs/newfs.c | 22 |
2 files changed, 7 insertions, 20 deletions
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) { |