From 84bd550148aad62bd004d7398bf50a32a742e5cc Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 24 Sep 2002 00:13:19 -0400 Subject: [PATCH] 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! --- misc/ChangeLog | 8 ++++++++ misc/fsck.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/misc/ChangeLog b/misc/ChangeLog index ed5e105..ac84bcd 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,11 @@ +2002-09-24 Theodore Ts'o + + * 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 * mke2fs.c (main): Enable directory indexing by default. diff --git a/misc/fsck.c b/misc/fsck.c index 19578a8..e4c19a3 100644 --- a/misc/fsck.c +++ b/misc/fsck.c @@ -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; -- 1.8.3.1