mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
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:
1 parent
f81750e0b1
commit
d76ecad517
1 file changed
+5
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user