summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>1998-12-21 13:41:47 +0000
committerArtur Grabowski <art@cvs.openbsd.org>1998-12-21 13:41:47 +0000
commite4eff56e031848712509625c92da20da450815f7 (patch)
tree0a67ebeaaf0223102e1d30ed7530a342671b8e13 /sbin
parent0d8e5524cf4c5396b5d3b60fc4bb3c28d989f134 (diff)
Write a nice error message when we get EOPNOTSUPP from mount(2)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_kernfs/mount_kernfs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sbin/mount_kernfs/mount_kernfs.c b/sbin/mount_kernfs/mount_kernfs.c
index b7d10b38fcf..89257807f38 100644
--- a/sbin/mount_kernfs/mount_kernfs.c
+++ b/sbin/mount_kernfs/mount_kernfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_kernfs.c,v 1.4 1997/01/15 23:41:21 millert Exp $ */
+/* $OpenBSD: mount_kernfs.c,v 1.5 1998/12/21 13:41:46 art Exp $ */
/* $NetBSD: mount_kernfs.c,v 1.8 1996/04/13 05:35:39 cgd Exp $ */
/*
@@ -48,7 +48,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_kernfs.c 8.2 (Berkeley) 3/27/94";
#else
-static char rcsid[] = "$OpenBSD: mount_kernfs.c,v 1.4 1997/01/15 23:41:21 millert Exp $";
+static char rcsid[] = "$OpenBSD: mount_kernfs.c,v 1.5 1998/12/21 13:41:46 art Exp $";
#endif
#endif /* not lint */
@@ -93,8 +93,12 @@ main(argc, argv)
if (argc != 2)
usage();
- if (mount(MOUNT_KERNFS, argv[1], mntflags, NULL))
- err(1, NULL);
+ if (mount(MOUNT_KERNFS, argv[1], mntflags, NULL)) {
+ if (errno == EOPNOTSUPP)
+ errx(1, "Filesystem not supported by kernel");
+ else
+ err(1, NULL);
+ }
exit(0);
}