mirror of
https://github.com/troglobit/finit.git
synced 2026-11-18 19:30:56 +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)
|
static int fsck(int pass)
|
||||||
{
|
{
|
||||||
|
int save;
|
||||||
struct fstab *fs;
|
struct fstab *fs;
|
||||||
|
|
||||||
if (!setfsent()) {
|
if (!setfsent()) {
|
||||||
@@ -86,6 +87,9 @@ static int fsck(int pass)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save = debug;
|
||||||
|
debug = 0;
|
||||||
|
|
||||||
while ((fs = getfsent())) {
|
while ((fs = getfsent())) {
|
||||||
char cmd[80];
|
char cmd[80];
|
||||||
struct stat st;
|
struct stat st;
|
||||||
@@ -105,6 +109,7 @@ static int fsck(int pass)
|
|||||||
run_interactive(cmd, "Checking filesystem %.13s", fs->fs_spec);
|
run_interactive(cmd, "Checking filesystem %.13s", fs->fs_spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug = save;
|
||||||
endfsent();
|
endfsent();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in new issue
Block a user