On 2017-03-15 07:45, Lorenzo Colitti wrote:
1. Factor out repeated code to a new xs_has_arg function.
2. Add a new parse_wait_time option to parse the value of -w.
3. Make parse_wait_interval take argc and argv so its callers
can be simpler.
Signed-off-by: Lorenzo Colitti <lorenzo@xxxxxxxxxx>
Hi Lorenzo
I am seeing a compilation failure with this patch.
It might require a fix like below.
diff --git a/iptables/xtables.c b/iptables/xtables.c
index 45a7644..bde8ba6 100644
--- a/iptables/xtables.c
+++ b/iptables/xtables.c
@@ -1012,9 +1012,10 @@ void do_parse(struct nft_handle *h, int argc,
char *argv[],
"iptables-restore");
}
if (optarg)
- parse_wait_interval(optarg,
&wait_interval);
+ parse_wait_interval(argc, argv,
+ &wait_interval);
else if (xs_has_arg(argc, argv))
- parse_wait_interval(argv[optind++],
+ parse_wait_interval(argc, argv,
&wait_interval);
wait_interval_set = true;
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html