* [PATCH] mkfs.f2fs: introduce new option V to show version
@ 2018-04-08 2:15 Sheng Yong
2018-04-08 6:17 ` Chao Yu
0 siblings, 1 reply; 4+ messages in thread
From: Sheng Yong @ 2018-04-08 2:15 UTC (permalink / raw)
To: jaegeuk, yuchao0; +Cc: ebiggers, linux-f2fs-devel
This patch introduces a new option -V to show the version of mkfs.f2fs
and exit after that.
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
mkfs/f2fs_format_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/mkfs/f2fs_format_main.c b/mkfs/f2fs_format_main.c
index 3c70513..3520882 100644
--- a/mkfs/f2fs_format_main.c
+++ b/mkfs/f2fs_format_main.c
@@ -58,6 +58,7 @@ static void mkfs_usage()
MSG(0, " -t 0: nodiscard, 1: discard [default:1]\n");
MSG(0, " -w wanted sector size\n");
MSG(0, " -z # of sections per zone [default:1]\n");
+ MSG(0, " -V print the version number and exit\n");
MSG(0, "sectors: number of sectors. [default: determined by device size]\n");
exit(1);
}
@@ -136,7 +137,7 @@ static void parse_feature(const char *features)
static void f2fs_parse_options(int argc, char *argv[])
{
- static const char *option_string = "qa:c:d:e:E:il:mo:O:s:S:z:t:fw:";
+ static const char *option_string = "qa:c:d:e:E:il:mo:O:s:S:z:t:fw:V";
int32_t option=0;
while ((option = getopt(argc,argv,option_string)) != EOF) {
@@ -209,6 +210,10 @@ static void f2fs_parse_options(int argc, char *argv[])
case 'w':
c.wanted_sector_size = atoi(optarg);
break;
+ case 'V':
+ MSG(0, "mkfs.f2fs %s (%s)\n",
+ F2FS_TOOLS_VERSION, F2FS_TOOLS_DATE);
+ exit(0);
default:
MSG(0, "\tError: Unknown option %c\n",option);
mkfs_usage();
--
2.14.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mkfs.f2fs: introduce new option V to show version
2018-04-08 2:15 [PATCH] mkfs.f2fs: introduce new option V to show version Sheng Yong
@ 2018-04-08 6:17 ` Chao Yu
2018-04-09 17:55 ` Jaegeuk Kim
0 siblings, 1 reply; 4+ messages in thread
From: Chao Yu @ 2018-04-08 6:17 UTC (permalink / raw)
To: Sheng Yong, jaegeuk; +Cc: ebiggers, linux-f2fs-devel
On 2018/4/8 10:15, Sheng Yong wrote:
> This patch introduces a new option -V to show the version of mkfs.f2fs
> and exit after that.
BTW, should we add -V for other misc tools?
>
> Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mkfs.f2fs: introduce new option V to show version
2018-04-08 6:17 ` Chao Yu
@ 2018-04-09 17:55 ` Jaegeuk Kim
2018-04-10 1:46 ` Sheng Yong
0 siblings, 1 reply; 4+ messages in thread
From: Jaegeuk Kim @ 2018-04-09 17:55 UTC (permalink / raw)
To: Chao Yu; +Cc: ebiggers, linux-f2fs-devel
On 04/08, Chao Yu wrote:
> On 2018/4/8 10:15, Sheng Yong wrote:
> > This patch introduces a new option -V to show the version of mkfs.f2fs
> > and exit after that.
>
> BTW, should we add -V for other misc tools?
Yes, could you please add this for others?
>
> >
> > Signed-off-by: Sheng Yong <shengyong1@huawei.com>
>
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>
> Thanks,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mkfs.f2fs: introduce new option V to show version
2018-04-09 17:55 ` Jaegeuk Kim
@ 2018-04-10 1:46 ` Sheng Yong
0 siblings, 0 replies; 4+ messages in thread
From: Sheng Yong @ 2018-04-10 1:46 UTC (permalink / raw)
To: Jaegeuk Kim, Chao Yu; +Cc: ebiggers, linux-f2fs-devel
On 2018/4/10 1:55, Jaegeuk Kim wrote:
> On 04/08, Chao Yu wrote:
>> On 2018/4/8 10:15, Sheng Yong wrote:
>>> This patch introduces a new option -V to show the version of mkfs.f2fs
>>> and exit after that.
>>
>> BTW, should we add -V for other misc tools?
>
> Yes, could you please add this for others?
>
OK. I'll do that.
thanks,
Sheng
>>
>>>
>>> Signed-off-by: Sheng Yong <shengyong1@huawei.com>
>>
>> Reviewed-by: Chao Yu <yuchao0@huawei.com>
>>
>> Thanks,
>
> .
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-10 1:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-08 2:15 [PATCH] mkfs.f2fs: introduce new option V to show version Sheng Yong
2018-04-08 6:17 ` Chao Yu
2018-04-09 17:55 ` Jaegeuk Kim
2018-04-10 1:46 ` Sheng Yong
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.