summaryrefslogtreecommitdiff
path: root/sbin/mount_umap
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_umap
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_umap')
-rw-r--r--sbin/mount_umap/mount_umap.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sbin/mount_umap/mount_umap.c b/sbin/mount_umap/mount_umap.c
index 1c8cf67453a..b34c03e1e64 100644
--- a/sbin/mount_umap/mount_umap.c
+++ b/sbin/mount_umap/mount_umap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_umap.c,v 1.5 1997/01/15 23:41:26 millert Exp $ */
+/* $OpenBSD: mount_umap.c,v 1.6 1997/08/20 05:10:27 millert Exp $ */
/* $NetBSD: mount_umap.c,v 1.5 1996/04/13 01:32:05 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_umap.c 8.3 (Berkeley) 3/27/94";
#else
-static char rcsid[] = "$OpenBSD: mount_umap.c,v 1.5 1997/01/15 23:41:26 millert Exp $";
+static char rcsid[] = "$OpenBSD: mount_umap.c,v 1.6 1997/08/20 05:10:27 millert Exp $";
#endif
#endif /* not lint */
@@ -58,6 +58,7 @@ static char rcsid[] = "$OpenBSD: mount_umap.c,v 1.5 1997/01/15 23:41:26 millert
#include <miscfs/umapfs/umap.h>
#include <err.h>
+#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -230,8 +231,13 @@ main(argc, argv)
args.gnentries = gnentries;
args.gmapdata = gmapdata;
- if (mount(MOUNT_UMAP, argv[1], mntflags, &args))
- err(1, NULL);
+ if (mount(MOUNT_UMAP, argv[1], mntflags, &args)) {
+ if (errno == EOPNOTSUPP)
+ errx(1, "%s: Filesystem not supported by kernel",
+ argv[1]);
+ else
+ err(1, argv[1]);
+ }
exit(0);
}