Re: [PATCH] btrfs-progs: dump-tree: print invalid argument and strerror

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

 



On Thu, Aug 30, 2018 at 05:08:04PM +0800, Su Yue wrote:
> Before this patch:
> $ ls nothingness
> ls: cannot access 'nothingness': No such file or directory
> $ btrfs inspect-internal dump-tree nothingness
> ERROR: not a block device or regular file: nothingness
> 
> The confusing error message makes users thinks that nonexistent
> file is existed but in wrong type.
> 
> This patch let check_arg_type return -errno if realpath failed.
> And print strerror if check_arg_type failed and the returned code
> is negative. Like:
> 
> $ btrfs inspect-internal dump-tree nothingness
> ERROR: invalid argument: nothingness: No such file or directory
> 
> Signed-off-by: Su Yue <suy.fnst@xxxxxxxxxxxxxx>

Applied, thanks.



[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