All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one
Date: Wed, 15 May 2019 16:26:15 +0200	[thread overview]
Message-ID: <20190515142615.GS3138@twin.jikos.cz> (raw)
In-Reply-To: <1553838594-26013-1-git-send-email-anand.jain@oracle.com>

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.

  parent reply	other threads:[~2019-05-15 14:25 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 ` David Sterba [this message]
2019-05-28 12:47   ` [PATCH 1/2] btrfs-progs: scan: cleanup, return errno when we have one Anand Jain

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=20190515142615.GS3138@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.