1
0
Fork 0

Adding upstream version 2.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:15:30 +01:00
parent 50aec1e4c5
commit 1b3a431c1d
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
521 changed files with 21541 additions and 21644 deletions

View file

@ -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;
}