summaryrefslogtreecommitdiff
path: root/sbin/mount_portal/mount_portal.c
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_portal/mount_portal.c
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_portal/mount_portal.c')
-rw-r--r--sbin/mount_portal/mount_portal.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c
index a6f38b3a81c..af96e341bf3 100644
--- a/sbin/mount_portal/mount_portal.c
+++ b/sbin/mount_portal/mount_portal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount_portal.c,v 1.12 1997/08/04 19:25:19 deraadt Exp $ */
+/* $OpenBSD: mount_portal.c,v 1.13 1997/08/20 05:10:25 millert Exp $ */
/* $NetBSD: mount_portal.c,v 1.8 1996/04/13 01:31:54 jtc Exp $ */
/*
@@ -47,7 +47,7 @@ char copyright[] =
#if 0
static char sccsid[] = "@(#)mount_portal.c 8.6 (Berkeley) 4/26/95";
#else
-static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.12 1997/08/04 19:25:19 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mount_portal.c,v 1.13 1997/08/20 05:10:25 millert Exp $";
#endif
#endif /* not lint */
@@ -129,7 +129,6 @@ main(argc, argv)
int fdssize;
qelem q;
- int rc;
int so;
int error = 0;
@@ -201,9 +200,12 @@ main(argc, argv)
*/
openlog("portald", LOG_CONS|LOG_PID, LOG_DAEMON);
- rc = mount(MOUNT_PORTAL, mountpt, mntflags, &args);
- if (rc < 0) {
- syslog(LOG_ERR, "mount: %m");
+ if (mount(MOUNT_PORTAL, mountpt, mntflags, &args)) {
+ if (errno == EOPNOTSUPP)
+ syslog(LOG_ERR,
+ "mount: Filesystem not supported by kernel");
+ else
+ syslog(LOG_ERR, "mount: %m");
exit(1);
}