]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-status: Don't reduce all negative statuses to ECOMM
authorSagi Grimberg <sagi@grimberg.me>
Wed, 9 Sep 2020 21:58:33 +0000 (14:58 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 11 Sep 2020 17:03:15 +0000 (10:03 -0700)
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@grimberg.me>
nvme-status.c

index a78c1fd027976af1305bd6a821ea0eed796540b4..7821de2df2888d0108793d6ac8ac04e10b06ff1b 100644 (file)
@@ -142,7 +142,7 @@ __u8 nvme_status_to_errno(int status, bool fabrics)
                return 0;
 
        if (status < 0)
-               return ECOMM;
+               return errno;
 
        /*
         * The actual status code is enough with masking 0xff, but we need to