From d76ecad517581b8843ae781877af404a80686f93 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Tue, 2 Aug 2016 02:00:01 +0200 Subject: [PATCH] fsck: Prevent debug during interactive fsck The debug mode cannot be used in run_interactive() that early, so we must disable it during the complete fsck run. Signed-off-by: Joachim Nilsson --- finit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/finit.c b/finit.c index 8286ee42..346744f4 100644 --- a/finit.c +++ b/finit.c @@ -79,6 +79,7 @@ static int banner(void) */ static int fsck(int pass) { + int save; struct fstab *fs; if (!setfsent()) { @@ -86,6 +87,9 @@ static int fsck(int pass) return 1; } + save = debug; + debug = 0; + while ((fs = getfsent())) { char cmd[80]; struct stat st; @@ -105,6 +109,7 @@ static int fsck(int pass) run_interactive(cmd, "Checking filesystem %.13s", fs->fs_spec); } + debug = save; endfsent(); return 0;