diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-14 18:27:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-16 15:11:56 +0000 |
commit | 6197903bd42478987516bc4cc3f0769488a37065 (patch) | |
tree | 508d399340039960289dd1d96696db7c56c22321 /plugins/ymtc | |
parent | Adding upstream version 1.16. (diff) | |
download | nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.tar.xz nvme-cli-6197903bd42478987516bc4cc3f0769488a37065.zip |
Adding upstream version 2.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/ymtc')
-rw-r--r-- | plugins/ymtc/ymtc-nvme.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/plugins/ymtc/ymtc-nvme.c b/plugins/ymtc/ymtc-nvme.c index 91e52be..dd5f004 100644 --- a/plugins/ymtc/ymtc-nvme.c +++ b/plugins/ymtc/ymtc-nvme.c @@ -4,15 +4,11 @@ #include <stdlib.h> #include <unistd.h> -#include "linux/nvme_ioctl.h" - #include "nvme.h" -#include "nvme-print.h" -#include "nvme-ioctl.h" +#include "libnvme.h" #include "plugin.h" - -#include "argconfig.h" -#include "suffix.h" +#include "linux/types.h" +#include "nvme-print.h" #define CREATE_CMD #include "ymtc-nvme.h" @@ -116,7 +112,7 @@ static int get_additional_smart_log(int argc, char **argv, struct command *cmd, const char *raw = "dump output in binary format"; struct config { __u32 namespace_id; - int raw_binary; + bool raw_binary; }; struct config cfg = { @@ -133,8 +129,8 @@ static int get_additional_smart_log(int argc, char **argv, struct command *cmd, if (fd < 0) return fd; - err = nvme_get_log(fd, cfg.namespace_id, 0xca, false, - NVME_NO_LOG_LSP, sizeof(smart_log), &smart_log); + err = nvme_get_nsid_log(fd, false, 0xca, cfg.namespace_id, + sizeof(smart_log), &smart_log); if (!err) { if (!cfg.raw_binary) err = show_ymtc_smart_log(fd, cfg.namespace_id, devicename, &smart_log); @@ -142,7 +138,7 @@ static int get_additional_smart_log(int argc, char **argv, struct command *cmd, d_raw((unsigned char *)&smart_log, sizeof(smart_log)); } if (err > 0) - fprintf(stderr, "NVMe Status:%s(%x)\n", nvme_status_to_string(err), err); + nvme_show_status(err); return err; } |