All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] mkfs.f2fs: Fix behavior of -g option to match the man page.
@ 2020-12-15  1:58 John A. Leuenhagen via Linux-f2fs-devel
  2020-12-17  6:26 ` Jaegeuk Kim
  0 siblings, 1 reply; 3+ messages in thread
From: John A. Leuenhagen via Linux-f2fs-devel @ 2020-12-15  1:58 UTC (permalink / raw)
  To: linux-f2fs-devel

The man page states that simply specifying the -g option will use the
default Android options. However, mkfs.f2fs currently requires the user
to specify `-g android`. This makes the behavior of mkfs.f2fs match the
man page.

Signed-off-by: John A. Leuenhagen <john@zlima12.com>
---
 mkfs/f2fs_format_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index 03eb748..8db2191 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -129,7 +129,7 @@ static void add_default_options(void)
 
 static void f2fs_parse_options(int argc, char *argv[])
 {
-	static const char *option_string = "qa:c:C:d:e:E:g:hil:mo:O:rR:s:S:z:t:T:U:Vfw:";
+	static const char *option_string = "qa:c:C:d:e:E:ghil:mo:O:rR:s:S:z:t:T:U:Vfw:";
 	static const struct option long_opts[] = {
 		{ .name = "help", .has_arg = 0, .flag = NULL, .val = 'h' },
 		{ .name = NULL, .has_arg = 0, .flag = NULL, .val = 0 }
@@ -169,8 +169,7 @@ static void f2fs_parse_options(int argc, char *argv[])
 			c.extension_list[1] = strdup(optarg);
 			break;
 		case 'g':
-			if (!strcmp(optarg, "android"))
-				c.defset = CONF_ANDROID;
+			c.defset = CONF_ANDROID;
 			break;
 		case 'h':
 			mkfs_usage();
-- 
2.26.2



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-17  7:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-15  1:58 [f2fs-dev] [PATCH] mkfs.f2fs: Fix behavior of -g option to match the man page John A. Leuenhagen via Linux-f2fs-devel
2020-12-17  6:26 ` Jaegeuk Kim
2020-12-17  7:37   ` John A. Leuenhagen via Linux-f2fs-devel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.