From: root Date: Wed, 6 Jul 2016 16:58:01 +0000 (-0700) Subject: Display NVMe command status in both string and hex format for write_uncorr and write_... X-Git-Tag: v0.9~25^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=403ade0d4946c53c1d05a21e3baf87cf2867584f;p=users%2Fsagi%2Fnvme-cli.git Display NVMe command status in both string and hex format for write_uncorr and write_zeroes commands --- diff --git a/nvme.c b/nvme.c index 2bd194c4..3e1b3d60 100644 --- a/nvme.c +++ b/nvme.c @@ -1639,7 +1639,8 @@ static int write_uncor(int argc, char **argv, struct command *cmd, struct plugin if (err < 0) return errno; else if (err != 0) - fprintf(stderr, "NVME Write Uncorrectable Command Error:%d\n", err); + fprintf(stderr, "NVME IO command error:%s(%x)\n", + nvme_status_to_string(err), err); else printf("NVME Write Uncorrectable Success\n"); return err; @@ -1713,7 +1714,8 @@ static int write_zeroes(int argc, char **argv, struct command *cmd, struct plugi if (err < 0) return errno; else if (err != 0) - fprintf(stderr, "NVME Write Zeroes Command Error:%d\n", err); + fprintf(stderr, "NVME IO command error:%s(%x)\n", + nvme_status_to_string(err), err); else printf("NVME Write Zeroes Success\n"); return err;