[PATCH v2 nvme-cli] nvme-status: Don't reduce all negative statuses to ECOMM

Sagi Grimberg sagi at grimberg.me
Wed Sep 9 17:58:33 EDT 2020


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>
---
Changes from v1:
- return errno instead of status

 nvme-status.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nvme-status.c b/nvme-status.c
index a78c1fd02797..7821de2df288 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 errno;
 
 	/*
 	 * The actual status code is enough with masking 0xff, but we need to
-- 
2.25.1




More information about the Linux-nvme mailing list