Whamcloud - gitweb
ChangeLog, e2fsck.8.in, unix.c:
authorTheodore Ts'o <tytso@mit.edu>
Sun, 1 Feb 1998 00:16:40 +0000 (00:16 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 1 Feb 1998 00:16:40 +0000 (00:16 +0000)
  unix.c (main): In the case where the filesystem revision is too high,
   print the message about the superblock possibly being corrupt.
  e2fsck.8.in: Add expanded comments about how the -b option works.

e2fsck/ChangeLog
e2fsck/e2fsck.8.in
e2fsck/unix.c

index bee6f1e..1f80af2 100644 (file)
@@ -1,3 +1,12 @@
+Tue Jan 20 15:37:01 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * unix.c (main): In the case where the filesystem revision is too
+               high, print the message about the superblock possibly
+               being corrupt.
+
+       * e2fsck.8.in: Add expanded comments about how the -b option
+               works. 
+
 Sat Jan 17 13:02:16 1998  Theodore Ts'o  <tytso@rsts-11.mit.edu>
 
        * e2fsck.h: If EXT2_FLAT_INCLUDES is defined, then assume all of
index 9cf9035..03cbd68 100644 (file)
@@ -40,9 +40,14 @@ suggested that people use
 option whenever possible.
 .TP
 .I -b superblock
-Instead of using the normal superblock, use the alternative superblock
+Instead of using the normal superblock, use an alternative superblock
 specified by 
-.IR superblock .
+.IR superblock .  This option is normally used when the primary superblock 
+has been corrupted; most filesystems have primary superblocks located at 
+blocks 8193, 16385, etc.  If an alternative superblock is specified and 
+the filesystem is not opened read-only, e2fsck will make sure that the
+primary superblock is updated appropriately upon completion of the 
+filesystem check.
 .TP
 .I -B blocksize
 Normally, 
index b6e68ff..10b3e8a 100644 (file)
@@ -494,10 +494,14 @@ restart:
        if (retval) {
                com_err(ctx->program_name, retval, "while trying to open %s",
                        ctx->filesystem_name);
-               if (retval == EXT2_ET_REV_TOO_HIGH)
-                       printf ("Get a newer version of e2fsck!\n");
-               else if (retval == EXT2_ET_SHORT_READ)
-                       printf ("Could this be a zero-length partition?\n");
+               if (retval == EXT2_ET_REV_TOO_HIGH) {
+                       printf("The filesystem revision is apparently "
+                              "too high for this version of e2fsck.\n"
+                              "(Or the filesystem superblock "
+                              "is corrupt)\n\n");
+                       fix_problem(ctx, PR_0_SB_CORRUPT, &pctx);
+               } else if (retval == EXT2_ET_SHORT_READ)
+                       printf("Could this be a zero-length partition?\n");
                else if ((retval == EPERM) || (retval == EACCES))
                        printf("You must have %s access to the "
                               "filesystem or be root\n",
@@ -510,7 +514,6 @@ restart:
                        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);