Netdev List
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org, davem@davemloft.net, nikolay@redhat.com
Subject: Re: [patch iproute2] bond_slave: add help and fail on unknown opt
Date: Sun, 28 Sep 2014 15:56:25 -0700	[thread overview]
Message-ID: <20140928155625.59234ddb@urahara> (raw)
In-Reply-To: <1409903125-21200-1-git-send-email-jiri@resnulli.us>

On Fri,  5 Sep 2014 09:45:25 +0200
Jiri Pirko <jiri@resnulli.us> wrote:

> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
> ---
>  ip/iplink_bond_slave.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/ip/iplink_bond_slave.c b/ip/iplink_bond_slave.c
> index aacba14..3c26f08 100644
> --- a/ip/iplink_bond_slave.c
> +++ b/ip/iplink_bond_slave.c
> @@ -17,6 +17,13 @@
>  #include "utils.h"
>  #include "ip_common.h"
>  
> +static void explain(void)
> +{
> +	fprintf(stderr,
> +		"Usage: ... bond_slave [ queue_id QUEUE_ID ]\n"
> +	);
> +}
> +
>  static const char *slave_states[] = {
>  	[BOND_STATE_ACTIVE] = "ACTIVE",
>  	[BOND_STATE_BACKUP] = "BACKUP",
> @@ -91,6 +98,14 @@ static int bond_slave_parse_opt(struct link_util *lu, int argc, char **argv,
>  			if (get_u16(&queue_id, *argv, 0))
>  				invarg("queue_id is invalid", *argv);
>  			addattr16(n, 1024, IFLA_BOND_SLAVE_QUEUE_ID, queue_id);
> +		} else if (matches(*argv, "help") == 0) {
> +			explain();
> +			return -1;
> +		} else {
> +			fprintf(stderr, "bond_slave: unknown option \"%s\"?\n",
> +				*argv);
> +			explain();
> +			return -1;
>  		}
>  		argc--, argv++;
>  	}

This patch does not apply. there is probably some earlier patch you forgot to send about
BOND_SLAVE_QUEUE_ID.

      reply	other threads:[~2014-09-28 22:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 14:43 [PATCH net-next iproute2] iproute2: allow to change slave options via type_slave Nikolay Aleksandrov
2014-09-03 15:02 ` Jiri Pirko
2014-09-03 15:57   ` [PATCH net-next iproute2 v2] " Nikolay Aleksandrov
2014-09-03 16:04     ` Jiri Pirko
2014-09-05  7:45     ` [patch iproute2] bond_slave: add help and fail on unknown opt Jiri Pirko
2014-09-28 22:56       ` Stephen Hemminger [this message]

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=20140928155625.59234ddb@urahara \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@redhat.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