diff options
author | 1998-12-21 13:41:46 +0000 | |
---|---|---|
committer | 1998-12-21 13:41:46 +0000 | |
commit | 9b09b062932f16383ed54972a25bd31c8dbc0d50 (patch) | |
tree | b624a5015b3aa6672d51b9515d0c01275694ea65 | |
parent | Steal commit from d: forgetting to update comments is a bad idea. (diff) | |
download | wireguard-openbsd-9b09b062932f16383ed54972a25bd31c8dbc0d50.tar.xz wireguard-openbsd-9b09b062932f16383ed54972a25bd31c8dbc0d50.zip |
Write a nice error message when we get EOPNOTSUPP from mount(2)
-rw-r--r-- | sbin/mount_kernfs/mount_kernfs.c | 12 |
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); } |