diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1997-08-20 05:10:29 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1997-08-20 05:10:29 +0000 |
commit | 4dbea4d156fdd79e17137250bcd9a12c9ad09c3b (patch) | |
tree | 4d8cbcbf5eac0e6e596e4b51ab324244fcdc874b /sbin/mount_cd9660/mount_cd9660.c | |
parent | 02165d4ef16cba14b8092704510f78d0c8b62059 (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_cd9660/mount_cd9660.c')
-rw-r--r-- | sbin/mount_cd9660/mount_cd9660.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index 8d44a555269..42d689a0ccd 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_cd9660.c,v 1.6 1997/04/19 20:10:13 deraadt Exp $ */ +/* $OpenBSD: mount_cd9660.c,v 1.7 1997/08/20 05:10:18 millert Exp $ */ /* $NetBSD: mount_cd9660.c,v 1.3 1996/04/13 01:31:08 jtc Exp $ */ /* @@ -49,7 +49,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_cd9660.c 8.4 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_cd9660.c,v 1.6 1997/04/19 20:10:13 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mount_cd9660.c,v 1.7 1997/08/20 05:10:18 millert Exp $"; #endif #endif /* not lint */ @@ -58,6 +58,7 @@ static char rcsid[] = "$OpenBSD: mount_cd9660.c,v 1.6 1997/04/19 20:10:13 deraad #include <sys/mount.h> #include <err.h> +#include <errno.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -123,8 +124,12 @@ main(argc, argv) args.export.ex_flags = 0; args.flags = opts; - if (mount(MOUNT_CD9660, dir, mntflags, &args) < 0) - err(1, NULL); + if (mount(MOUNT_CD9660, dir, mntflags, &args) < 0) { + if (errno == EOPNOTSUPP) + errx(1, "%s: Filesystem not supported by kernel", dir); + else + err(1, dir); + } exit(0); } |