]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
Replace accidental line deletions
authorKeith Busch <kbusch@kernel.org>
Mon, 17 Feb 2020 21:09:56 +0000 (13:09 -0800)
committerKeith Busch <kbusch@kernel.org>
Mon, 17 Feb 2020 21:09:56 +0000 (13:09 -0800)
Signed-off-by: Keith Busch <kbusch@kernel.org>
libnvme
nvme.c

diff --git a/libnvme b/libnvme
index cb642a0ce386d274ba04baeab5e60b4232423a67..dac8cc72072388bd56ad12b1d9613657aef1e87a 160000 (submodule)
--- a/libnvme
+++ b/libnvme
@@ -1 +1 @@
-Subproject commit cb642a0ce386d274ba04baeab5e60b4232423a67
+Subproject commit dac8cc72072388bd56ad12b1d9613657aef1e87a
diff --git a/nvme.c b/nvme.c
index 9037487559a67c8f5b801eb87bb8ef54662882a4..e457d1844b47b87b7e0f98b44c2719680535ff08 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -222,6 +222,15 @@ int validate_output_format(char *format)
        return -EINVAL;
 }
 
+void nvme_show_status(const char *prefix, int status)
+{
+       if (status < 0)
+               perror(prefix);
+       else
+               fprintf(stderr, "%s: nvme status: %s(%#x)\n", prefix,
+                       nvme_status_to_string(status), status);
+}
+
 static int get_smart_log(int argc, char **argv, struct command *cmd, struct plugin *plugin)
 {
        struct nvme_smart_log log;