From: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
To: Lorenzo Colitti <lorenzo@google.com>
Cc: netfilter-devel@vger.kernel.org, pablo@netfilter.org,
jscherpelz@google.com, zlpnobody@gmail.com
Subject: Re: [PATCH iptables 1/2] iptables: remove duplicated argument parsing code
Date: Wed, 15 Mar 2017 17:49:15 -0600 [thread overview]
Message-ID: <30ea803326b87cfdc78ebe8d3b373a04@codeaurora.org> (raw)
In-Reply-To: <20170315134553.35772-2-lorenzo@google.com>
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@google.com>
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
next prev parent reply other threads:[~2017-03-15 23:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-15 13:45 [PATCH iptables]: Support the iptables lock in ip[6]tables-restore Lorenzo Colitti
2017-03-15 13:45 ` [PATCH iptables 1/2] iptables: remove duplicated argument parsing code Lorenzo Colitti
2017-03-15 23:49 ` Subash Abhinov Kasiviswanathan [this message]
2017-03-16 7:56 ` Lorenzo Colitti
2017-03-15 13:45 ` [PATCH iptables 2/2] iptables-restore: support acquiring the lock Lorenzo Colitti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=30ea803326b87cfdc78ebe8d3b373a04@codeaurora.org \
--to=subashab@codeaurora.org \
--cc=jscherpelz@google.com \
--cc=lorenzo@google.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=zlpnobody@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).