[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 1/2] Always query device by uuid only.



Milan Broz <mbroz redhat com> writes:
> --- a/lib/activate/dev_manager.c
> +++ b/lib/activate/dev_manager.c
> @@ -123,12 +123,14 @@ static int _info_run(const char *name, const char *dlid, struct dm_info *info,
>  {
>  	int r = 0;
>  	struct dm_task *dmt;
> -	int dmtask;
>  
> -	dmtask = mknodes ? DM_DEVICE_MKNODES : DM_DEVICE_INFO;
> -
> -	if (!(dmt = _setup_task(name, dlid, 0, dmtask, major, minor)))
> -		return_0;
> +	if (mknodes) {
> +		if (!(dmt = _setup_task(name, dlid, 0, DM_DEVICE_MKNODES, major, minor)))
> +			return_0;
> +	} else {
> +		if (!(dmt = _setup_task(NULL, dlid, 0, DM_DEVICE_INFO, major, minor)))
> +			return_0;
> +	}

Can we instead have

if (!(dmt = _setup_task(mknodes ? name : NULL, dlid, 0, dmtask, major, minor)))
	return_0;

please?

Otherwise, ACK.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]