From 85fbc5df588599a55397d184c2196a80d921baba Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 10 Jun 2003 17:51:03 +0000 Subject: o make mount(2) return EROFS, not EPERM if ffs is dirty o document EROFS in man page (2 possible causes) o recognize EROFS in mount_ffs and try to give a reasonable error message deraadt@ OK --- sbin/mount_ffs/mount_ffs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sbin/mount_ffs') diff --git a/sbin/mount_ffs/mount_ffs.c b/sbin/mount_ffs/mount_ffs.c index 07b0fcd84c5..afa9286493c 100644 --- a/sbin/mount_ffs/mount_ffs.c +++ b/sbin/mount_ffs/mount_ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mount_ffs.c,v 1.14 2003/06/02 20:06:15 millert Exp $ */ +/* $OpenBSD: mount_ffs.c,v 1.15 2003/06/10 17:51:01 millert Exp $ */ /* $NetBSD: mount_ffs.c,v 1.3 1996/04/13 01:31:19 jtc Exp $ */ /*- @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)mount_ufs.c 8.2 (Berkeley) 3/27/94"; #else -static char rcsid[] = "$OpenBSD: mount_ffs.c,v 1.14 2003/06/02 20:06:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: mount_ffs.c,v 1.15 2003/06/10 17:51:01 millert Exp $"; #endif #endif /* not lint */ @@ -117,6 +117,10 @@ main(argc, argv) case EOPNOTSUPP: errcause = "filesystem not supported by kernel"; break; + case EROFS: + errcause = + "filesystem must be mounted read-only; you may need to run fsck"; + break; default: errcause = strerror(errno); break; -- cgit v1.2.3