argconfig: Rewind optind before looping on getopt_long
Sagi Grimberg
maintainerPATCH 1/1 argconfig: Rewind optind before looping on getopt_long
In conf file based discovery we can call argconfig_parse multiple times.
--- argconfig.c | 1 + 1 file changed, 1 insertion(+)
argconfig.c +1 -0
@@ -193,6 +193,7 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, short_opts[short_index++] ='h' ; short_opts[short_index] =0 ; + optind =0 ;while ((c =getopt_long_only (argc, argv, short_opts, long_opts, &option_index)) !=-1 ) {if (c !=0 ) {
Signature · 1 line
2.7.4
PATCH 1/1 argconfig: Rewind optind before looping on getopt_long
Quoted 2 lines · Sagi Grimberg
In conf file based discovery we can call
argconfig_parsemultiple times.
Jay beat you to it. :)
https://github.com/linux-nvme/nvme-cli/commit/2da2440f1e5e98df61b192446be7c68a170dcda6
Quoted 18 lines
Reported-by Jay Freyensee <james_p_freyensee at linux.intel.com>Signed-off-by Sagi Grimberg <sagi at grimberg.me>--- argconfig.c | 1 + 1 file changed, 1 insertion(+)argconfig.c +1
-0@@ -193,6 +193,7 @@ int argconfig_parse(int argc, char *argv[], const char *program_desc, short_opts[short_index++] ='h' ; short_opts[short_index] =0 ; + optind =0 ;while ((c =getopt_long_only (argc, argv, short_opts, long_opts, &option_index)) !=-1 ) {if (c !=0 ) {
Sagi Grimberg
maintainerPATCH 1/1 argconfig: Rewind optind before looping on getopt_long
Quoted 5 lines
Quoted 3 lines
In conf file based discovery we can call
argconfig_parsemultiple times.Jay beat you to it. :)
Heh :)
October is a multi-holiday sparse month...
Thanks Jay!
PATCH 1/1 argconfig: Rewind optind before looping on getopt_long
Quoted 5 lines · Sagi Grimberg
Quoted 5 lines
Quoted 4 lines
In conf file based discovery we can call
argconfig_parsemultiple times.
Quoted 7 lines
Quoted 1 line
Jay beat you to it. :)
Heh :)
October is a multi-holiday sparse month...
Thanks Jay!
No thank you :-)
Quoted 5 lines
_______________________________________________
Linux-nvme mailing list
Linux-nvme at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme