From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one
Date: Tue, 28 May 2019 20:47:38 +0800 [thread overview]
Message-ID: <d26a26fa-b065-a684-3cce-8924c9ad540d@oracle.com> (raw)
In-Reply-To: <20190515142615.GS3138@twin.jikos.cz>
On 15/5/19 10:26 PM, David Sterba wrote:
> 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.
>
Ok. errno is better error informative though. Interpreted by shell seems
to be a roadblock.
prev parent reply other threads:[~2019-05-28 12:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-29 5:49 [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one Anand Jain
2019-03-29 5:49 ` [PATCH 2/2] btrfs-progs: scan: pass blkid_get_cache error code Anand Jain
2019-05-15 14:29 ` David Sterba
2019-05-28 12:48 ` Anand Jain
2019-05-15 14:26 ` [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one David Sterba
2019-05-28 12:47 ` Anand Jain [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=d26a26fa-b065-a684-3cce-8924c9ad540d@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
/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).