[lvm-devel] [PATCH 6/6] Exit status 0 for 'dmsetup -c -o help'

Alasdair G Kergon agk at redhat.com
Wed Jul 7 18:16:02 UTC 2010


On Wed, Jul 07, 2010 at 02:29:36PM +0200, Zdenek Kabelac wrote:
> diff --git a/tools/dmsetup.c b/tools/dmsetup.c
> index 5e71542..479cbb0 100644
> --- a/tools/dmsetup.c
> +++ b/tools/dmsetup.c
> @@ -3340,6 +3340,7 @@ int main(int argc, char **argv)
>  	}
>  
>  	if (argc == 0) {
> +		r = 0;
>  		_usage(stderr);
>  		goto out;

How does that work?

# dmsetup

Should give failure status.
(It already does.)

# dmsetup help

Should give success.
(It already does.)

# dmsetup -c -o help

Should give success.
(It doesn't.)

Alasdair




More information about the lvm-devel mailing list