mirror of
https://gitee.com/openharmony/third_party_f2fs-tools
synced 2024-11-23 10:10:00 +00:00
fsck.f2fs: a separate option for showing directory tree
Showing directory tree reuses dbg_lv that if setting "-t", fsck.f2fs does not show any others. Users may want much information include the debug info and directory tree. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
7f00dd441c
commit
6fb673abc0
@ -1028,7 +1028,7 @@ static void print_dentry(__u32 depth, __u8 *name,
|
||||
int bit_offset;
|
||||
unsigned char new[F2FS_NAME_LEN + 1];
|
||||
|
||||
if (c.dbg_lv != -1)
|
||||
if (!c.show_dentry)
|
||||
return;
|
||||
|
||||
name_len = le16_to_cpu(dentry[idx].name_len);
|
||||
|
@ -29,7 +29,7 @@ void fsck_usage()
|
||||
MSG(0, " -d debug level [default:0]\n");
|
||||
MSG(0, " -f check/fix entire partition\n");
|
||||
MSG(0, " -p preen mode [default:0 the same as -a [0|1]]\n");
|
||||
MSG(0, " -t show directory tree [-d -1]\n");
|
||||
MSG(0, " -t show directory tree\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ void f2fs_parse_options(int argc, char *argv[])
|
||||
MSG(0, "Info: Force to fix corruption\n");
|
||||
break;
|
||||
case 't':
|
||||
c.dbg_lv = -1;
|
||||
c.show_dentry = 1;
|
||||
break;
|
||||
|
||||
|
||||
|
@ -285,6 +285,7 @@ struct f2fs_configuration {
|
||||
char *extension_list;
|
||||
const char *rootdev_name;
|
||||
int dbg_lv;
|
||||
int show_dentry;
|
||||
int trim;
|
||||
int func;
|
||||
void *private;
|
||||
|
Loading…
Reference in New Issue
Block a user