summaryrefslogtreecommitdiff
path: root/sbin/mount_cd9660/mount_cd9660.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/mount_cd9660/mount_cd9660.c')
-rw-r--r--sbin/mount_cd9660/mount_cd9660.c13
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);
}