diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-06-10 17:51:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-06-10 17:51:03 +0000 |
commit | 85fbc5df588599a55397d184c2196a80d921baba (patch) | |
tree | a4a13dc9b14c87fcde2c883fbce9291b01a85240 /sbin/mount_ffs | |
parent | 32db52eeb07fc0762873048cd4d39e3d4f159ea4 (diff) |
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
Diffstat (limited to 'sbin/mount_ffs')
-rw-r--r-- | sbin/mount_ffs/mount_ffs.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; |