* Re: [PATCH] [multipath-tools]'multipath' with -h and -t option, it returns '1' (fail) for successful command execution.
[not found] <1317706703.1886.132.camel@arunaltc>
@ 2011-10-04 17:52 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2011-10-04 17:52 UTC (permalink / raw)
To: aruna; +Cc: dm-devel
On mar., 2011-10-04 at 11:08 +0530, aruna wrote:
> Hi,
>
> The patch handles the exit status of -h and -t option for multipath
> command.
>
You patch does not apply to the HEAD. And you should submit with patch
inline for "git am" to work and preserve your patch comment and
authorship.
Thanks,
cvaroqui
> # multipath -h
> multipath-tools v0.4.9 (05/33, 2016)
> Usage:
> multipath [-d] [-r] [-v lvl] [-p pol] [-b fil] [dev]
> multipath -l|-ll|-f [-v lvl] [-b fil] [dev]
> multipath -F [-v lvl]
> multipath -t
> multipath -h
>
> .......
>
> # echo $?
> 1
>
>
> # multipath -t | more
> defaults {
> verbosity 2
> polling_interval 10
> udev_dir "/dev"
> multipath_dir "/lib64/multipath"
> ...
> }
> ...
>
>
> # echo $?
> 1
>
>
> Since kernel.org is unavailable i have got the recent snapshot from
>
> http://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=f7735ad547d9ebb952993ac0a6def0400fb23c80;sf=tgz
>
>
> Thanks,
> Aruna Balakrishnaiah
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][multipath-tools]'multipath' with -h and -t option, it returns '1' (fail) for successful command execution
[not found] <20111005143410.4265.68055.stgit@arunaltc>
@ 2011-10-05 20:45 ` Christophe Varoqui
0 siblings, 0 replies; 2+ messages in thread
From: Christophe Varoqui @ 2011-10-05 20:45 UTC (permalink / raw)
To: Aruna Balakrishnaiah; +Cc: dm-devel, arunabal
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) {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-05 20:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20111005143410.4265.68055.stgit@arunaltc>
2011-10-05 20:45 ` [PATCH][multipath-tools]'multipath' with -h and -t option, it returns '1' (fail) for successful command execution Christophe Varoqui
[not found] <1317706703.1886.132.camel@arunaltc>
2011-10-04 17:52 ` [PATCH] [multipath-tools]'multipath' " Christophe Varoqui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.