[PATCH nvme-cli] nvme-status: Don't reduce all negative statuses to ECOMM
Keith Busch
kbusch at kernel.org
Wed Sep 9 17:27:17 EDT 2020
On Wed, Sep 09, 2020 at 02:21:29PM -0700, Sagi Grimberg wrote:
> There should be no reason why we should reduce all the semantic status
> codes we are getting from the device/driver to a single meaningless
> status code.
>
> Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
> ---
> nvme-status.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/nvme-status.c b/nvme-status.c
> index a78c1fd02797..29982541466d 100644
> --- a/nvme-status.c
> +++ b/nvme-status.c
> @@ -142,7 +142,7 @@ __u8 nvme_status_to_errno(int status, bool fabrics)
> return 0;
>
> if (status < 0)
> - return ECOMM;
> + return status;
Shouldn't this be 'return errno' instead?
More information about the Linux-nvme
mailing list