Whamcloud - gitweb
fsck.c: If the bone-headed user enters the filename twice, the
authorTheodore Ts'o <tytso@mit.edu>
Tue, 24 Sep 2002 04:13:19 +0000 (00:13 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 24 Sep 2002 04:13:19 +0000 (00:13 -0400)
-R option which skips the root filesystem will skip all of
them.  (Addresses Debian bug #159423).  Note!  This is not
a precedent for dealing intelligently with any other kind
of doubled entry in /etc/fstab!

misc/ChangeLog
misc/fsck.c

index ed5e105..ac84bcd 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-24  Theodore Ts'o  <tytso@mit.edu>
+
+       * fsck.c: If the bone-headed user enters the filename twice, the
+               -R option which skips the root filesystem will skip all of
+               them.  (Addresses Debian bug #159423).  Note!  This is not
+               a precedent for dealing intelligently with any other kind
+               of doubled entry in /etc/fstab!
+
 2002-09-22  root  <tytso@mit.edu>
 
        * mke2fs.c (main): Enable directory indexing by default.
index 19578a8..e4c19a3 100644 (file)
@@ -925,6 +925,14 @@ static int check_all(NOARGS)
                        fs->flags |= FLAG_DONE;
                }
        }
+       /*
+        * This is for the bone-headed user who enters the root
+        * filesystem twice.  Skip root will skep all root entries.
+        */
+       if (skip_root)
+               for (fs = filesys_info; fs; fs = fs->next)
+                       if (!strcmp(fs->mountpt, "/"))
+                               fs->flags |= FLAG_DONE;
 
        while (not_done_yet) {
                not_done_yet = 0;