diff options
author | peter <peter@FreeBSD.org> | 1997-03-11 12:38:16 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-03-11 12:38:16 +0000 |
commit | f461294e0761e04bbc572e265770de9410b31c41 (patch) | |
tree | 0098d27cb695b517755074e5c35d2eff286c2abf /sbin/mount_std | |
parent | 2feef020b355ece983a669243a95d099367b171c (diff) | |
download | FreeBSD-src-f461294e0761e04bbc572e265770de9410b31c41.zip FreeBSD-src-f461294e0761e04bbc572e265770de9410b31c41.tar.gz |
Update to compile under Lite2
Diffstat (limited to 'sbin/mount_std')
-rw-r--r-- | sbin/mount_std/Makefile | 1 | ||||
-rw-r--r-- | sbin/mount_std/mount_std.c | 18 |
2 files changed, 10 insertions, 9 deletions
diff --git a/sbin/mount_std/Makefile b/sbin/mount_std/Makefile index 4085850..91befcf 100644 --- a/sbin/mount_std/Makefile +++ b/sbin/mount_std/Makefile @@ -7,6 +7,7 @@ MLINKS= mount_std.8 mount_devfs.8 mount_std.8 mount_fdesc.8 \ mount_std.8 mount_kernfs.8 mount_std.8 mount_procfs.8 MOUNT= ${.CURDIR}/../mount +CFLAGS+= -D_NEW_VFSCONF CFLAGS+= -I${MOUNT} .PATH: ${MOUNT} diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c index 06da08e..584605e 100644 --- a/sbin/mount_std/mount_std.c +++ b/sbin/mount_std/mount_std.c @@ -43,7 +43,7 @@ char copyright[] = #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: mount_std.c,v 1.5 1997/02/22 14:32:59 peter Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -72,7 +72,8 @@ main(argc, argv) char *argv[]; { int ch, mntflags; - struct vfsconf *vfc; + struct vfsconf vfc; + int error; /* * XXX @@ -106,18 +107,17 @@ main(argc, argv) if (argc != 2) usage(); - vfc = getvfsbyname(fsname); - if(!vfc && vfsisloadable(fsname)) { - if(vfsload(fsname)) { + error = getvfsbyname(fsname, &vfc); + if (error && vfsisloadable(fsname)) { + if(vfsload(fsname)) err(EX_OSERR, "vfsload(%s)", fsname); - } endvfsent(); - vfc = getvfsbyname(fsname); + error = getvfsbyname(fsname, &vfc); } - if (!vfc) + if (error) errx(EX_OSERR, "%s filesystem not available", fsname); - if (mount(vfc->vfc_index, argv[1], mntflags, NULL)) + if (mount(vfc.vfc_name, argv[1], mntflags, NULL)) err(EX_OSERR, NULL); exit(0); } |