ChangeLog, unix.c:
Add a special case check for the error code EROFS and display an
appropriate error message for this case.
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 083d7ac..42a9023 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,5 +1,8 @@
Mon Nov 3 14:35:29 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
+ * unix.c (main): Add a special case check for the error code EROFS
+ and display an appropriate error message for this case.
+
* [lots of files]: Change ext2fs_read_inode, ext2fs_write_inode
to take the e2fsck context as their first argument.
Change dir_info.c routines to take an e2fsck_context,
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 97bb33d..f5c3191 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -511,6 +511,13 @@
"r/o" : "r/w");
else if (retval == ENXIO)
printf("Possibly non-existent or swap device?\n");
+#ifdef EROFS
+ else if (retval == EROFS)
+ printf("Disk write-protected; use the -n option"
+ "to do a read-only\n"
+ "check of the device.\n");
+
+#endif
else
fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
fatal_error(0);