* [patch iproute2] add help command to bonding master
@ 2014-09-05 13:24 Jiri Pirko
2014-09-05 13:41 ` Vadim Kochan
2014-09-28 23:07 ` Stephen Hemminger
0 siblings, 2 replies; 4+ messages in thread
From: Jiri Pirko @ 2014-09-05 13:24 UTC (permalink / raw)
To: netdev; +Cc: davem, stephen, nikolay
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
---
ip/iplink_bond.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
index b5c511e..0a1ed03 100644
--- a/ip/iplink_bond.c
+++ b/ip/iplink_bond.c
@@ -339,6 +339,9 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
}
ad_select = get_index(ad_select_tbl, *argv);
addattr8(n, 1024, IFLA_BOND_AD_SELECT, ad_select);
+ } else if (matches(*argv, "help") == 0) {
+ explain();
+ return -1;
} else {
fprintf(stderr, "bond: unknown command \"%s\"?\n", *argv);
explain();
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch iproute2] add help command to bonding master
2014-09-05 13:24 [patch iproute2] add help command to bonding master Jiri Pirko
@ 2014-09-05 13:41 ` Vadim Kochan
2014-09-05 13:53 ` Jiri Pirko
2014-09-28 23:07 ` Stephen Hemminger
1 sibling, 1 reply; 4+ messages in thread
From: Vadim Kochan @ 2014-09-05 13:41 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, Stephen Hemminger, nikolay
Sorry, may be this is not related to this particular patch:
would not it better to use usage() name instead of explain() as it
is used everywhere ?
On Fri, Sep 5, 2014 at 4:24 PM, Jiri Pirko <jiri@resnulli.us> wrote:
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
> ip/iplink_bond.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
> index b5c511e..0a1ed03 100644
> --- a/ip/iplink_bond.c
> +++ b/ip/iplink_bond.c
> @@ -339,6 +339,9 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> }
> ad_select = get_index(ad_select_tbl, *argv);
> addattr8(n, 1024, IFLA_BOND_AD_SELECT, ad_select);
> + } else if (matches(*argv, "help") == 0) {
> + explain();
> + return -1;
> } else {
> fprintf(stderr, "bond: unknown command \"%s\"?\n", *argv);
> explain();
> --
> 1.9.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch iproute2] add help command to bonding master
2014-09-05 13:41 ` Vadim Kochan
@ 2014-09-05 13:53 ` Jiri Pirko
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2014-09-05 13:53 UTC (permalink / raw)
To: Vadim Kochan; +Cc: netdev, davem, Stephen Hemminger, nikolay
Fri, Sep 05, 2014 at 03:41:14PM CEST, vadim4j@gmail.com wrote:
>Sorry, may be this is not related to this particular patch:
>
> would not it better to use usage() name instead of explain() as it
>is used everywhere ?
Well, yes, that is certainly doable. Feel free to send patch.
>
>On Fri, Sep 5, 2014 at 4:24 PM, Jiri Pirko <jiri@resnulli.us> wrote:
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>> ---
>> ip/iplink_bond.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
>> index b5c511e..0a1ed03 100644
>> --- a/ip/iplink_bond.c
>> +++ b/ip/iplink_bond.c
>> @@ -339,6 +339,9 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
>> }
>> ad_select = get_index(ad_select_tbl, *argv);
>> addattr8(n, 1024, IFLA_BOND_AD_SELECT, ad_select);
>> + } else if (matches(*argv, "help") == 0) {
>> + explain();
>> + return -1;
>> } else {
>> fprintf(stderr, "bond: unknown command \"%s\"?\n", *argv);
>> explain();
>> --
>> 1.9.3
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch iproute2] add help command to bonding master
2014-09-05 13:24 [patch iproute2] add help command to bonding master Jiri Pirko
2014-09-05 13:41 ` Vadim Kochan
@ 2014-09-28 23:07 ` Stephen Hemminger
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2014-09-28 23:07 UTC (permalink / raw)
To: Jiri Pirko; +Cc: netdev, davem, nikolay
On Fri, 5 Sep 2014 15:24:16 +0200
Jiri Pirko <jiri@resnulli.us> wrote:
> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
> ip/iplink_bond.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/ip/iplink_bond.c b/ip/iplink_bond.c
> index b5c511e..0a1ed03 100644
> --- a/ip/iplink_bond.c
> +++ b/ip/iplink_bond.c
> @@ -339,6 +339,9 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
> }
> ad_select = get_index(ad_select_tbl, *argv);
> addattr8(n, 1024, IFLA_BOND_AD_SELECT, ad_select);
> + } else if (matches(*argv, "help") == 0) {
> + explain();
> + return -1;
> } else {
> fprintf(stderr, "bond: unknown command \"%s\"?\n", *argv);
> explain();
Applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-28 23:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 13:24 [patch iproute2] add help command to bonding master Jiri Pirko
2014-09-05 13:41 ` Vadim Kochan
2014-09-05 13:53 ` Jiri Pirko
2014-09-28 23:07 ` Stephen Hemminger
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).