linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Su Yue <suy.fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: dump-tree: print invalid argument and strerror
Date: Tue, 11 Sep 2018 16:44:19 +0200	[thread overview]
Message-ID: <20180911144419.GC2997@twin.jikos.cz> (raw)
In-Reply-To: <20180830090804.13264-1-suy.fnst@cn.fujitsu.com>

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@cn.fujitsu.com>

Applied, thanks.

      reply	other threads:[~2018-09-11 17:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-30  9:08 [PATCH] btrfs-progs: dump-tree: print invalid argument and strerror Su Yue
2018-09-11 14:44 ` David Sterba [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180911144419.GC2997@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=suy.fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).