From f461294e0761e04bbc572e265770de9410b31c41 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 11 Mar 1997 12:38:16 +0000 Subject: Update to compile under Lite2 --- sbin/mount_std/Makefile | 1 + sbin/mount_std/mount_std.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'sbin/mount_std') 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 @@ -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); } -- cgit v1.1