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.
