f2fs-tools: fix to set c.auto_fix only for fsck
PATCH 1/1 f2fs-tools: fix to set c.auto_fix only for fsck
add_default_options() will be reused by fsck family tools, including dump, dfrag, resize, sload, label, inject, add a comment for this.
And also fix to set c.auto_fix only for fsck in add_default_options().
Signed-off-by Chao Yu <[email protected]>
--- fsck/main.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)
fsck/main.c +9 -7
@@ -215,17 +215,19 @@ static void error_out(char *prog)MSG (0 ,"\nWrong program.\n" ); } -static void __add_fsck_options (void ) -{ -/* -a */ - c.auto_fix =1 ; -} -static void add_default_options (void ) {switch (c.defset) {case CONF_ANDROID : -__add_fsck_options (); +if (c.func ==FSCK ) { +/* -a */ + c.auto_fix =1 ; + } + +/* +* global config for fsck family including inject, lable, sload, +* resize, defrag and dump. +*/ /* disable nat_bits feature by default */ c.disabled_feature |=F2FS_FEATURE_NAT_BITS ;
Signature · 8 lines
2.40.1 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel