diff options
author | wollman <wollman@FreeBSD.org> | 1996-05-13 17:43:19 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1996-05-13 17:43:19 +0000 |
commit | 5eea098aaa4a43538ceabc7a7ffaeb0986cea33c (patch) | |
tree | 45a3a22a6378c4db6229097d19a3e57ef24f2e5c /sbin/mount_nfs/mount_nfs.c | |
parent | e1cb6ef79c8ab94af413aabdbf5b2b7c1ffca3a9 (diff) | |
download | FreeBSD-src-5eea098aaa4a43538ceabc7a7ffaeb0986cea33c.zip FreeBSD-src-5eea098aaa4a43538ceabc7a7ffaeb0986cea33c.tar.gz |
Get rid of the last vestiges of the old MOUNT_* constants in the
mount_* programs. While we're at it, collapse the four now-identical
mount programs for devfs, fdesc, kernfs, and procfs into links to
a new mount_std(8) which can mount any really generic filesystem
such as these when called with the appropriate argv[0].
Also, convert the mount programs to use sysexits.h.
Diffstat (limited to 'sbin/mount_nfs/mount_nfs.c')
-rw-r--r-- | sbin/mount_nfs/mount_nfs.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index 1a8cd40..c03de0c 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -41,7 +41,11 @@ static char copyright[] = #endif /* not lint */ #ifndef lint +/* static char sccsid[] = "@(#)mount_nfs.c 8.3 (Berkeley) 3/27/94"; +*/ +static const char rcsid[] = + "$Id$"; #endif /* not lint */ #include <sys/param.h> @@ -82,6 +86,7 @@ static char sccsid[] = "@(#)mount_nfs.c 8.3 (Berkeley) 3/27/94"; #include <stdio.h> #include <stdlib.h> #include <strings.h> +#include <sysexits.h> #include <unistd.h> #include "mntopts.h" @@ -411,12 +416,14 @@ main(argc, argv) vfc = getvfsbyname("nfs"); if(!vfc && vfsisloadable("nfs")) { if(vfsload("nfs")) - err(1, "vfsload(nfs)"); + err(EX_OSERR, "vfsload(nfs)"); endvfsent(); /* flush cache */ vfc = getvfsbyname("nfs"); } + if (!vfc) + errx(EX_OSERR, "nfs filesystem is not loadable"); - if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp)) + if (mount(vfc->vfc_index, name, mntflags, nfsargsp)) #else if (mount(MOUNT_NFS, name, mntflags, nfsargsp)) #endif |