Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: Kexec Mailing List <kexec@lists.infradead.org>
Subject: Re: [PATCH] Return error code in case of invalid command line option
Date: Thu, 4 Sep 2014 09:38:20 +0900	[thread overview]
Message-ID: <20140904003820.GD13821@verge.net.au> (raw)
In-Reply-To: <20140903152917.GA23097@redhat.com>

On Wed, Sep 03, 2014 at 11:29:17AM -0400, Vivek Goyal wrote:
> Currently kexec returns success even if an invalid command line option
> is encountered. Kexec currently prints usage message and then returns
> 0. That's not right. It is an error and error code 1 should be returned.
> 
> Due to this wrapper script thinks that kdump succeeded but that's not
> the case.
> 
> Signed-off-by: Vivek Goyal <vgoyal@redhat.com>

Thanks, applied.

> ---
>  kexec/kexec.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> Index: kexec-tools/kexec/kexec.c
> ===================================================================
> --- kexec-tools.orig/kexec/kexec.c	2014-08-28 15:36:17.563115135 -0400
> +++ kexec-tools/kexec/kexec.c	2014-09-03 11:19:46.505871590 -0400
> @@ -1209,6 +1209,8 @@ int main(int argc, char *argv[])
>  				  options, 0)) != -1) {
>  		switch(opt) {
>  		case '?':
> +			usage();
> +			return 1;
>  		case OPT_HELP:
>  			usage();
>  			return 0;
> 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2014-09-04  0:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-03 15:29 [PATCH] Return error code in case of invalid command line option Vivek Goyal
2014-09-04  0:38 ` Simon Horman [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=20140904003820.GD13821@verge.net.au \
    --to=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=vgoyal@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