summaryrefslogtreecommitdiff
path: root/ubifs-utils/fsck.ubifs/problem.c
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 17:08:13 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:46 +0100
commitb064a78fb9a9503a4bf87a5149ca8fe5711b2cff (patch)
tree57cc3bd5087647f881bad3b4200dd348b2033d26 /ubifs-utils/fsck.ubifs/problem.c
parentdf5d5489aed7ae9de007776e19350bd5aebbfea2 (diff)
fsck.ubifs: Check and create the root dir
This is the 15/18 step of fsck. Check whether the root dir is existed, create a new one if it is not found. This step makes sure that filesystem can be mounted successful. Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/fsck.ubifs/problem.c')
-rw-r--r--ubifs-utils/fsck.ubifs/problem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ubifs-utils/fsck.ubifs/problem.c b/ubifs-utils/fsck.ubifs/problem.c
index 32182c9..8e7e1e1 100644
--- a/ubifs-utils/fsck.ubifs/problem.c
+++ b/ubifs-utils/fsck.ubifs/problem.c
@@ -68,6 +68,7 @@ static const struct fsck_problem problem_table[] = {
{PROBLEM_FIXABLE | PROBLEM_MUST_FIX, "Incorrect space statistics"}, // SPACE_STAT_INCORRECT
{PROBLEM_FIXABLE | PROBLEM_MUST_FIX, "Inconsistent properties for lprops table"}, // LTAB_INCORRECT
{PROBLEM_FIXABLE | PROBLEM_MUST_FIX, "Incorrect index size"}, // INCORRECT_IDX_SZ
+ {PROBLEM_FIXABLE | PROBLEM_MUST_FIX, "Root dir is lost"}, // ROOT_DIR_NOT_FOUND
};
static const char *get_question(const struct fsck_problem *problem,
@@ -105,6 +106,8 @@ static const char *get_question(const struct fsck_problem *problem,
return "Put it into disconnected list?";
case LPT_CORRUPTED:
return "Rebuild LPT?";
+ case ROOT_DIR_NOT_FOUND:
+ return "Create a new one?";
}
return "Fix it?";