From: Christophe Varoqui <christophe.varoqui@gmail.com>
To: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
Cc: dm-devel@redhat.com, arunabal@in.ibm.com
Subject: Re: [PATCH][multipath-tools]'multipath' with -h and -t option, it returns '1' (fail) for successful command execution
Date: Wed, 05 Oct 2011 22:45:02 +0200 [thread overview]
Message-ID: <1317847502.32002.1.camel@lapoo.opensvc.com> (raw)
In-Reply-To: <20111005143410.4265.68055.stgit@arunaltc>
On mer., 2011-10-05 at 20:06 +0530, Aruna Balakrishnaiah wrote:
> Fix exit status for -h and -t options in multipath command
>
Merged.
Thanks for the effort to comply to the patch submission best practices.
cvaroqui
>
> ---
> multipath/main.c | 12 +++++++++---
> 1 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/multipath/main.c b/multipath/main.c
> index 654e031..9c45b8b 100644
> --- a/multipath/main.c
> +++ b/multipath/main.c
> @@ -116,7 +116,6 @@ usage (char * progname)
> " . multipath including the path with maj:min 'dev' (ex: 8:0)\n" \
> );
>
> - exit(1);
> }
>
> static int
> @@ -404,8 +403,10 @@ main (int argc, char *argv[])
> break;
> case 'v':
> if (sizeof(optarg) > sizeof(char *) ||
> - !isdigit(optarg[0]))
> + !isdigit(optarg[0])) {
> usage (argv[0]);
> + exit(1);
> + }
>
> conf->verbosity = atoi(optarg);
> break;
> @@ -445,24 +446,29 @@ main (int argc, char *argv[])
> if (conf->pgpolicy_flag == -1) {
> printf("'%s' is not a valid policy\n", optarg);
> usage(argv[0]);
> + exit(1);
> }
> break;
> case 'r':
> conf->force_reload = 1;
> break;
> case 't':
> - dump_config();
> + r = dump_config();
> goto out;
> case 'h':
> usage(argv[0]);
> + exit(0);
> case ':':
> fprintf(stderr, "Missing option arguement\n");
> usage(argv[0]);
> + exit(1);
> case '?':
> fprintf(stderr, "Unknown switch: %s\n", optarg);
> usage(argv[0]);
> + exit(1);
> default:
> usage(argv[0]);
> + exit(1);
> }
> }
> if (optind < argc) {
>
next parent reply other threads:[~2011-10-05 20:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20111005143410.4265.68055.stgit@arunaltc>
2011-10-05 20:45 ` Christophe Varoqui [this message]
[not found] <1317706703.1886.132.camel@arunaltc>
2011-10-04 17:52 ` [PATCH] [multipath-tools]'multipath' with -h and -t option, it returns '1' (fail) for successful command execution Christophe Varoqui
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=1317847502.32002.1.camel@lapoo.opensvc.com \
--to=christophe.varoqui@gmail.com \
--cc=aruna@linux.vnet.ibm.com \
--cc=arunabal@in.ibm.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@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