netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Kochan <vadim4j@gmail.com>
To: Mahesh Bandewar <maheshb@google.com>
Cc: netdev <netdev@vger.kernel.org>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Vadim Kochan <vadim4j@gmail.com>, Saied Kazemi <saied@google.com>
Subject: Re: [PATCH Iproute2 next] ip netns: 'ip netns id' cmd without argument should not give error
Date: Fri, 19 Dec 2014 10:31:53 +0200	[thread overview]
Message-ID: <20141219083153.GA11360@angus-think> (raw)
In-Reply-To: <1418969138-26199-1-git-send-email-maheshb@google.com>

On Thu, Dec 18, 2014 at 10:05:38PM -0800, Mahesh Bandewar wrote:
> The command 'ip netns identify' without PID parameter is supposed to
> use the self PID to identify its ns but a trivial error prevented it
> from doing so. This patch fixes that error.
> 
> So before the patch -
> 	# ip netns id
> 	No pid specified
> 	# echo $?
> 	1
> 	#
> 
> After the patch -
> 	# ip netns id
> 	test-ns
> 	# echo $?
> 	0
> 	#
> 
> Signed-off-by: Mahesh Bandewar <maheshb@google.com>
> Cc: Stephen Hemminger <stephen@networkplumber.org>
> Cc: Vadim Kochan <vadim4j@gmail.com> 
> Cc: Saied Kazemi <saied@google.com>
> ---
>  ip/ipnetns.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ip/ipnetns.c b/ip/ipnetns.c
> index 1c8aa029073e..ec9afa2177a5 100644
> --- a/ip/ipnetns.c
> +++ b/ip/ipnetns.c
> @@ -298,7 +298,7 @@ static int netns_identify(int argc, char **argv)
>  	DIR *dir;
>  	struct dirent *entry;
>  
> -	if (argc < 1) {
> +	if (!argc) {
>  		pidstr = "self";
>  	} else if (argc > 1) {
>  		fprintf(stderr, "extra arguments specified\n");
> -- 
> 2.2.0.rc0.207.ga3a616c
> 

Hi Mahesh,

I did not get such error on the current master branch?

Did I miss something ?

Regards,
Vadim Kochan

  reply	other threads:[~2014-12-19  8:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19  6:05 [PATCH Iproute2 next] ip netns: 'ip netns id' cmd without argument should not give error Mahesh Bandewar
2014-12-19  8:31 ` Vadim Kochan [this message]
2014-12-19 18:33   ` Mahesh Bandewar

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=20141219083153.GA11360@angus-think \
    --to=vadim4j@gmail.com \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=saied@google.com \
    --cc=stephen@networkplumber.org \
    /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).