From fabde6440cac726bcd6cec36bbc9946b67be45da Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:01:05 +0800 Subject: fsck.ubifs: Load filesystem information from UBI volume Load filesystem information from UBI volume (Similar to UBIFS mounting process), initialize kinds of buffers and read superblock. This is the base step for both fsck and rebuild_fs. Subsequent pacthes will complete this step by adding more steps(eg. read master, replay journal, etc.) which are only used in fsck. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/fsck.ubifs/fsck.ubifs.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ubifs-utils/fsck.ubifs/fsck.ubifs.h') diff --git a/ubifs-utils/fsck.ubifs/fsck.ubifs.h b/ubifs-utils/fsck.ubifs/fsck.ubifs.h index 762745f..c21082e 100644 --- a/ubifs-utils/fsck.ubifs/fsck.ubifs.h +++ b/ubifs-utils/fsck.ubifs/fsck.ubifs.h @@ -36,6 +36,9 @@ enum { NORMAL_MODE = 0, SAFE_MODE, DANGER_MODE0, DANGER_MODE1, REBUILD_MODE, CHECK_MODE }; +/* Types of inconsistent problems */ +enum { SB_CORRUPTED = 0 }; + /** * struct ubifs_fsck_info - UBIFS fsck information. * @mode: working mode @@ -95,4 +98,8 @@ extern int exit_code; /* problem.c */ bool fix_problem(const struct ubifs_info *c, int problem_type); +/* load_fs.c */ +int ubifs_load_filesystem(struct ubifs_info *c); +void ubifs_destroy_filesystem(struct ubifs_info *c); + #endif -- cgit v1.2.3