From e17ad291a8da970a4cf64a57796c30437d8c5fbd Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:01:03 +0800 Subject: fsck.ubifs: Add inconsistent problem handling asking function There are four dimensions to define the type of inconsistent problems: 1. fixable: Some inconsistent problems can't be fixed, for example corrupted superblock. Un-fixable problem will abort program. 2. must fix: Some inconsistent problems can be ignored(eg. incorrect isize), but some are not(eg. corrupted TNC), which will affect the subsequent fsck steps. 3. drop data: Some fixing methods will drop user data, which is unacceptable for safe mode. If it happens, fsck will be aborted. 4. need rebuild: Some inconsistent problems depends on rebuilding filesystem to be fixed(eg. corrupted master node, corrupted TNC). Define an asking function to handle above kinds of inconsistent problems. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/Makemodule.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ubifs-utils/Makemodule.am') diff --git a/ubifs-utils/Makemodule.am b/ubifs-utils/Makemodule.am index 9f4bd42..590f17b 100644 --- a/ubifs-utils/Makemodule.am +++ b/ubifs-utils/Makemodule.am @@ -80,7 +80,8 @@ fsck_ubifs_SOURCES = \ $(common_SOURCES) \ $(libubifs_SOURCES) \ ubifs-utils/fsck.ubifs/fsck.ubifs.h \ - ubifs-utils/fsck.ubifs/fsck.ubifs.c + ubifs-utils/fsck.ubifs/fsck.ubifs.c \ + ubifs-utils/fsck.ubifs/problem.c fsck_ubifs_LDADD = libmtd.a libubi.a $(ZLIB_LIBS) $(LZO_LIBS) $(ZSTD_LIBS) $(UUID_LIBS) $(LIBSELINUX_LIBS) $(OPENSSL_LIBS) \ $(DUMP_STACK_LD) -lm -lpthread -- cgit v1.2.3