fsck.f2fs: a separate option for showing directory tree
PATCH 1/1 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 <[email protected]>
--- fsck/fsck.c | 2 +- fsck/main.c | 4 ++-- include/f2fs_fs.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
fsck/fsck.c +1 -1
@@ -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);
fsck/main.c +2 -2
@@ -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 ;
include/f2fs_fs.h +1 -0
@@ -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;
Signature · 6 lines
2.9.3 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot