summaryrefslogtreecommitdiff
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-22 11:36:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-22 11:36:02 +0000
commit806021be093ad00ce2022a532c0f4cc99b0065ac (patch)
treec4f374fc66dbd93cdd093f4e1213808e855c8b39 /sbin/newfs/newfs.c
parent200dde568cd8db5fa9ddc42e6b5388df55a16573 (diff)
libutil
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r--sbin/newfs/newfs.c22
1 files changed, 3 insertions, 19 deletions
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) {