mirror of
https://github.com/troglobit/finit.git
synced 2026-10-10 16:52:39 +07: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:
@@ -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