[lvm-devel] [PATCH 1/3] Fix reporting dmsetup info -c -o all

Milan Broz mbroz at redhat.com
Mon Dec 14 15:18:58 UTC 2009


On 12/11/2009 05:13 PM, Zdenek Kabelac wrote:
> Use whole bitmask of all options.

IOW fixes
dmsetup info -c -o all
to work and print all possible values.

ACK.

> @@ -379,7 +379,9 @@ static uint32_t _all_match(struct dm_report *rh, const char *field, size_t flen)
>  			       _all_match(rh, prefixed_all,
>  					  strlen(prefixed_all));
>  		} else
> -			return rh->report_types;
> +			/* all without type use full bitmask */
> +			return (!rh->report_types)
> +				? UINT_MAX : rh->report_types;

IMHO better

#define DM_REPORT_TYPE_ALL_FIELDS ~0
(or something like that instead of UINT_MAX)

>  	}
>  
>  	for (t = rh->types; t->data_fn; t++) {

Milan




More information about the lvm-devel mailing list