Re: [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one

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

 



On Fri, Mar 29, 2019 at 01:49:53PM +0800, Anand Jain wrote:
> @@ -386,7 +386,9 @@ static int cmd_device_scan(int argc, char **argv)
>  	}
>  
>  out:
> -	return !!ret;
> +	if (ret < 0)
> +		return -ret;
> +	return ret;

No, cmd_device_scan as the command handler returns the error code that's
intepreted by shell. Most commands do just 0 and 1, in documented case
there are other values, but we can't return errno here.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux