summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/newfs.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-19 20:01:38 +0000
committerphk <phk@FreeBSD.org>2002-03-19 20:01:38 +0000
commit5d439a2c2615b70e5e9f7d6a50975c6cef656c14 (patch)
treed3675267279cd0dd3633bc69486fa923945a9880 /sbin/newfs/newfs.c
parentf7f2a5dc4710a86794d0a5fb094bb4959536b17e (diff)
downloadFreeBSD-src-5d439a2c2615b70e5e9f7d6a50975c6cef656c14.zip
FreeBSD-src-5d439a2c2615b70e5e9f7d6a50975c6cef656c14.tar.gz
Further cleanups.
Diffstat (limited to 'sbin/newfs/newfs.c')
-rw-r--r--sbin/newfs/newfs.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 7aee58d..ba0c31a 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -70,8 +70,10 @@ static const char rcsid[] =
#include <unistd.h>
#include <stdarg.h>
+#include "newfs.h"
-void fatal(const char *fmt, ...) __printflike(1, 2);
+static void fatal(const char *fmt, ...) __printflike(1, 2);
+static struct disklabel *getdisklabel(char *s, int fd);
#define COMPAT /* allow non-labeled disks */
@@ -194,11 +196,10 @@ main(int argc, char *argv[])
{
struct partition *pp;
struct disklabel *lp;
- struct disklabel *getdisklabel();
struct partition oldpartition;
struct stat st;
struct statfs *mp;
- char *cp, *s1, *s2, *special, *opstring;
+ char *cp, *s1, *s2, *special;
int ch, fsi, fso, len, n, vflag;
vflag = 0;
@@ -207,8 +208,8 @@ main(int argc, char *argv[])
else
progname = *argv;
- opstring = "NOS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:";
- while ((ch = getopt(argc, argv, opstring)) != -1)
+ while ((ch = getopt(argc, argv,
+ "NOS:T:Ua:b:c:d:e:f:g:h:i:k:l:m:n:o:p:r:s:t:u:vx:")) != -1)
switch (ch) {
case 'N':
Nflag = 1;
@@ -532,7 +533,7 @@ getdisklabel(char *s, int fd)
if (ioctl(fd, DIOCGDINFO, (char *)&lab) < 0) {
#ifdef COMPAT
if (disktype) {
- struct disklabel *lp, *getdiskbyname();
+ struct disklabel *lp;
unlabeled++;
lp = getdiskbyname(disktype);
OpenPOWER on IntegriCloud