add help command to bonding master
Subsystems (2)
PATCH 1/1 add help command to bonding master
--- ip/iplink_bond.c | 3 +++ 1 file changed, 3 insertions(+)
ip/iplink_bond.c +3 -0
@@ -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 ();
Signature · 1 line
1.9.3
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 ?
Quoted 26 lines · Jiri Pirko
Signed-off-by Jiri Pirko <[email protected]>--- ip/iplink_bond.c | 3 +++ 1 file changed, 3 insertions(+)ip/iplink_bond.c +3
-1@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Fri, Sep 05, 2014 at 03:41:14PM CEST, [email protected] wrote:
Sorry, may be this is not related to this particular patch:
would not it better to use
usage()name instead ofexplain()as it
is used everywhere ?
Well, yes, that is certainly doable. Feel free to send patch.
Quoted 28 lines · Jiri Pirko
Quoted 26 lines
Signed-off-by Jiri Pirko <[email protected]>--- ip/iplink_bond.c | 3 +++ 1 file changed, 3 insertions(+)ip/iplink_bond.c +3
-1@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Stephen Hemminger
AppliedQuoted 10 lines · On Fri, 5 Sep 2014 15:24:16 +0200 Jiri Pirko <[email protected]> wrote:
Signed-off-by Jiri Pirko <[email protected]>--- ip/iplink_bond.c | 3 +++ 1 file changed, 3 insertions(+)ip/iplink_bond.c +0
-0
ip/iplink_bond.c static int bond_parse_opt(struct link_util *lu, int argc, char **argv, · line 347
Quoted 9 lines
ip/iplink_bond.c +3
-0@@ -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