Whamcloud - gitweb
main.c (main): If the filesystem has errors or is not valid,
authorTheodore Ts'o <tytso@mit.edu>
Wed, 29 May 2002 03:19:14 +0000 (23:19 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 29 May 2002 03:19:14 +0000 (23:19 -0400)
then require an e2fsck -f run to be done on the filesystem
more.

resize/ChangeLog
resize/main.c

index e34adca..04414b1 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-28    <tytso@mit.edu>
+
+       * main.c (main): If the filesystem has errors or is not valid,
+               then require an e2fsck -f run be done on the filesystem
+               more.
+
 2002-04-09    <tytso@snap.thunk.org>
 
        * main.c (main): If resize_fs returns an error, don't print the
index 5610da5..7808b1d 100644 (file)
@@ -252,7 +252,9 @@ int main (int argc, char ** argv)
                        "long.  Nothing to do!\n\n"), new_size);
                exit(0);
        }
-       if (!force && (fs->super->s_lastcheck < fs->super->s_mtime)) {
+       if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) ||
+                      (fs->super->s_state & EXT2_ERROR_FS) ||
+                      ((fs->super->s_state & EXT2_VALID_FS) == 0))) {
                fprintf(stderr, _("Please run 'e2fsck -f %s' first.\n\n"),
                        device_name);
                exit(1);