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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2016-08-02 02:00:01 +02:00
parent f81750e0b1
commit d76ecad517
+5
View File
@@ -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;