diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 17:01:13 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:46 +0100 |
commit | 7ff702596bd5590a93ae55d217753fe4b671c6f4 (patch) | |
tree | 822b879f55e17ab6238ce2f9898e201c8e90215d /ubifs-utils/libubifs | |
parent | 5292e1cb94d038fe9588038f2bb8282b41efe12f (diff) |
fsck.ubifs: rebuild_fs: Check and correct files' information
This is the 6/12 step of rebuilding. Correct the file information.
Traverse all files and calculate information (nlink, size, xattr_cnt,
etc.) for each file just like check_leaf() does, correct inode node
based on the calculated information.
Now, all files are consistent, and UBIFS will pass chk_fs after mounting.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/libubifs')
-rw-r--r-- | ubifs-utils/libubifs/debug.c | 2 | ||||
-rw-r--r-- | ubifs-utils/libubifs/debug.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ubifs-utils/libubifs/debug.c b/ubifs-utils/libubifs/debug.c index 94928da..eaf403f 100644 --- a/ubifs-utils/libubifs/debug.c +++ b/ubifs-utils/libubifs/debug.c @@ -69,7 +69,7 @@ static const char *get_key_type(int type) } } -static const char *get_dent_type(int type) +const char *ubifs_get_type_name(int type) { switch (type) { case UBIFS_ITYPE_REG: diff --git a/ubifs-utils/libubifs/debug.h b/ubifs-utils/libubifs/debug.h index 2ac4302..4b475a0 100644 --- a/ubifs-utils/libubifs/debug.h +++ b/ubifs-utils/libubifs/debug.h @@ -84,6 +84,7 @@ static inline int dbg_is_chk_index(__unused const struct ubifs_info *c) { return 0; } /* Dump functions */ +const char *ubifs_get_type_name(int type); const char *dbg_ntype(int type); const char *dbg_cstate(int cmt_state); const char *dbg_jhead(int jhead); |