summaryrefslogtreecommitdiff
path: root/sbin/mount_nfs/mount_nfs.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-08-20 05:10:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-08-20 05:10:29 +0000
commit4dbea4d156fdd79e17137250bcd9a12c9ad09c3b (patch)
tree4d8cbcbf5eac0e6e596e4b51ab324244fcdc874b /sbin/mount_nfs/mount_nfs.c
parent02165d4ef16cba14b8092704510f78d0c8b62059 (diff)
Print "Filesystem not supported by kernel" not "Operation not supported by
device" (EOPNOTSUPP) so the real problem is obvious. Idea from Peter Seebach <seebs@taniemarie.solon.com>.
Diffstat (limited to 'sbin/mount_nfs/mount_nfs.c')
-rw-r--r--sbin/mount_nfs/mount_nfs.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 2a4c7cd849c..1c3c3c3fd10 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_nfs.c,v 1.12 1997/08/18 03:11:24 millert Exp $ */
+/* $OpenBSD: mount_nfs.c,v 1.13 1997/08/20 05:10:23 millert Exp $ */
/* $NetBSD: mount_nfs.c,v 1.12.4.1 1996/05/25 22:48:05 fvdl Exp $ */
/*
@@ -433,8 +433,12 @@ main(argc, argv)
if (!getnfsargs(spec, nfsargsp))
exit(1);
- if (mount(MOUNT_NFS, name, mntflags, nfsargsp))
- err(1, "%s", name);
+ if (mount(MOUNT_NFS, name, mntflags, nfsargsp)) {
+ if (errno == EOPNOTSUPP)
+ errx(1, "%s: Filesystem not supported by kernel", name);
+ else
+ err(1, name);
+ }
if (nfsargsp->flags & (NFSMNT_NQNFS | NFSMNT_KERB)) {
if ((opflags & ISBGRND) == 0) {
if (i = fork()) {