Support for fsck_mode=[auto,skip,force] + fsck_repair=[preen,no,yes]

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-02-28 00:49:55 +01:00
1 parent 7af257cccf
commit 1e1b3564dd
3 files changed
+45 -1

No files matched your search

+4 -1
View File
@@ -259,7 +259,7 @@ static int fsck(int pass)
#ifdef FSCK_FIX
snprintf(cmd, sizeof(cmd), "fsck -yf %s", dev);
#else
snprintf(cmd, sizeof(cmd), "fsck -a %s", dev);
snprintf(cmd, sizeof(cmd), "fsck %s %s %s", fsck_mode, fsck_repair, dev);
#endif
dbg("Running pass %d fsck command %s", pass, cmd);
fsck_rc = run_interactive(cmd, "Checking filesystem %s", dev);
@@ -286,6 +286,9 @@ static int fsck_all(void)
#ifndef FAST_BOOT
int pass;
if (!fsck_mode)
return 0;
for (pass = 1; pass < 10; pass++) {
rc = fsck(pass);
if (rc)