summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-15 12:32:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-08-15 12:32:10 +0000
commitd183dae21720faf38bc4f516052a31227a58f212 (patch)
treeb44b23345eb9b308e49c96e616bc2faaf0ef256b /plugins
parentAdding upstream version 2.1~rc0. (diff)
downloadnvme-cli-d183dae21720faf38bc4f516052a31227a58f212.tar.xz
nvme-cli-d183dae21720faf38bc4f516052a31227a58f212.zip
Adding upstream version 2.1.2.upstream/2.1.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--plugins/innogrit/innogrit-nvme.c2
-rw-r--r--plugins/micron/micron-nvme.c2
-rw-r--r--plugins/ocp/ocp-nvme.c4
-rw-r--r--plugins/seagate/seagate-nvme.c2
-rw-r--r--plugins/solidigm/solidigm-garbage-collection.c2
-rw-r--r--plugins/solidigm/solidigm-smart.c2
-rw-r--r--plugins/transcend/transcend-nvme.c2
-rw-r--r--plugins/virtium/virtium-nvme.c4
-rw-r--r--plugins/wdc/wdc-nvme.c32
9 files changed, 25 insertions, 27 deletions
diff --git a/plugins/innogrit/innogrit-nvme.c b/plugins/innogrit/innogrit-nvme.c
index 214fe72..220a5a7 100644
--- a/plugins/innogrit/innogrit-nvme.c
+++ b/plugins/innogrit/innogrit-nvme.c
@@ -42,7 +42,7 @@ static int innogrit_smart_log_additional(int argc, char **argv,
if (fd < 0)
return fd;
- nvme_get_log_smart(fd, cfg.namespace_id, true, &smart_log);
+ nvme_get_log_smart(fd, cfg.namespace_id, false, &smart_log);
nvme_show_smart_log(&smart_log, cfg.namespace_id, devicename, NORMAL);
printf("DW0[0-1] Defect Cnt : %u\n", pvsc_smart->defect_cnt);
diff --git a/plugins/micron/micron-nvme.c b/plugins/micron/micron-nvme.c
index d7ac3d4..1c3c51d 100644
--- a/plugins/micron/micron-nvme.c
+++ b/plugins/micron/micron-nvme.c
@@ -1759,7 +1759,7 @@ static void GetGenericLogs(int fd, const char *dir)
}
/* get fw slot info log */
- if (nvme_get_log_fw_slot(fd, 1, &fw_log) == 0) {
+ if (nvme_get_log_fw_slot(fd, false, &fw_log) == 0) {
WriteData((__u8*)&fw_log, sizeof(fw_log), dir,
"firmware_slot_info_log.bin", "firmware log");
}
diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c
index 56cfdff..52c28a8 100644
--- a/plugins/ocp/ocp-nvme.c
+++ b/plugins/ocp/ocp-nvme.c
@@ -429,7 +429,7 @@ static int ocp_smart_add_log(int argc, char **argv, struct command *cmd,
return ret;
}
-static int ocp_print_C3_log_normal(int fd, struct ssd_latency_monitor_log *log_data)
+static int ocp_print_C3_log_normal(struct ssd_latency_monitor_log *log_data)
{
printf("-Latency Monitor/C3 Log Page Data- \n");
printf(" Controller : %s\n", devicename);
@@ -725,7 +725,7 @@ static int get_c3_log_page(int fd, char *format)
switch (fmt) {
case NORMAL:
- ocp_print_C3_log_normal(fd, log_data);
+ ocp_print_C3_log_normal(log_data);
break;
case JSON:
ocp_print_C3_log_json(log_data);
diff --git a/plugins/seagate/seagate-nvme.c b/plugins/seagate/seagate-nvme.c
index 516cb1e..a527c0f 100644
--- a/plugins/seagate/seagate-nvme.c
+++ b/plugins/seagate/seagate-nvme.c
@@ -848,7 +848,7 @@ static int temp_stats(int argc, char **argv, struct command *cmd, struct plugin
if(strcmp(cfg.output_format,"json"))
printf("Seagate Temperature Stats Information :\n");
/*STEP-1 : Get Current Temperature from SMART */
- err = nvme_get_log_smart(fd, 0xffffffff, true, &smart_log);
+ err = nvme_get_log_smart(fd, 0xffffffff, false, &smart_log);
if (!err) {
temperature = ((smart_log.temperature[1] << 8) | smart_log.temperature[0]);
temperature = temperature ? temperature - 273 : 0;
diff --git a/plugins/solidigm/solidigm-garbage-collection.c b/plugins/solidigm/solidigm-garbage-collection.c
index c7f1286..415722b 100644
--- a/plugins/solidigm/solidigm-garbage-collection.c
+++ b/plugins/solidigm/solidigm-garbage-collection.c
@@ -86,7 +86,7 @@ int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *c
if (flags == -EINVAL) {
fprintf(stderr, "Invalid output format '%s'\n", cfg.output_format);
close(fd);
- return fd;
+ return flags;
}
garbage_control_collection_log_t gc_log;
diff --git a/plugins/solidigm/solidigm-smart.c b/plugins/solidigm/solidigm-smart.c
index 4b30cab..77a2210 100644
--- a/plugins/solidigm/solidigm-smart.c
+++ b/plugins/solidigm/solidigm-smart.c
@@ -228,7 +228,7 @@ int solidigm_get_additional_smart_log(int argc, char **argv, struct command *cmd
if (flags == -EINVAL) {
fprintf(stderr, "Invalid output format '%s'\n", cfg.output_format);
close(fd);
- return fd;
+ return flags;
}
err = nvme_get_log_simple(fd, solidigm_vu_smart_log_id, sizeof(smart_log_payload), &smart_log_payload);
diff --git a/plugins/transcend/transcend-nvme.c b/plugins/transcend/transcend-nvme.c
index 0a3d852..a3b739d 100644
--- a/plugins/transcend/transcend-nvme.c
+++ b/plugins/transcend/transcend-nvme.c
@@ -34,7 +34,7 @@ static int getHealthValue(int argc, char **argv, struct command *cmd, struct plu
printf("\nDevice not found \n");;
return -1;
}
- result = nvme_get_log_smart(fd, 0xffffffff, true, &smart_log);
+ result = nvme_get_log_smart(fd, 0xffffffff, false, &smart_log);
if (!result) {
printf("Transcend NVME heath value: ");
percent_used =smart_log.percent_used;
diff --git a/plugins/virtium/virtium-nvme.c b/plugins/virtium/virtium-nvme.c
index d9fc54e..b8cefe6 100644
--- a/plugins/virtium/virtium-nvme.c
+++ b/plugins/virtium/virtium-nvme.c
@@ -302,7 +302,7 @@ static int vt_add_entry_to_log(const int fd, const char *path, const struct vtvi
return -1;
}
- ret = nvme_get_log_smart(fd, NVME_NSID_ALL, true, &smart.raw_smart);
+ ret = nvme_get_log_smart(fd, NVME_NSID_ALL, false, &smart.raw_smart);
if (ret) {
printf("Cannot read device SMART log\n");
return -1;
@@ -354,7 +354,7 @@ static int vt_update_vtview_log_header(const int fd, const char *path, const str
return -1;
}
- ret = nvme_get_log_fw_slot(fd, true, &header.raw_fw);
+ ret = nvme_get_log_fw_slot(fd, false, &header.raw_fw);
if (ret) {
printf("Cannot read device firmware log\n");
return -1;
diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c
index 5be7e11..5f90c76 100644
--- a/plugins/wdc/wdc-nvme.c
+++ b/plugins/wdc/wdc-nvme.c
@@ -3498,8 +3498,7 @@ static int wdc_crash_dump(int fd, char *file, int type)
if (ret)
fprintf(stderr, "ERROR : WDC : failed to generate file name\n");
else
- ret = wdc_do_crash_dump(fd, f, type); \
- close(fd);
+ ret = wdc_do_crash_dump(fd, f, type);
return ret;
}
@@ -4157,7 +4156,7 @@ static void wdc_print_latency_monitor_log_json(struct wdc_ssd_latency_monitor_lo
json_free_object(root);
}
-static void wdc_print_error_rec_log_normal(int fd, struct wdc_ocp_c1_error_recovery_log *log_data)
+static void wdc_print_error_rec_log_normal(struct wdc_ocp_c1_error_recovery_log *log_data)
{
int j;
printf("Error Recovery/C1 Log Page Data \n");
@@ -4211,7 +4210,7 @@ static void wdc_print_error_rec_log_json(struct wdc_ocp_c1_error_recovery_log *l
json_free_object(root);
}
-static void wdc_print_dev_cap_log_normal(int fd, struct wdc_ocp_C4_dev_cap_log *log_data)
+static void wdc_print_dev_cap_log_normal(struct wdc_ocp_C4_dev_cap_log *log_data)
{
int j;
printf("Device Capabilities/C4 Log Page Data \n");
@@ -4272,7 +4271,7 @@ static void wdc_print_dev_cap_log_json(struct wdc_ocp_C4_dev_cap_log *log_data)
json_free_object(root);
}
-static void wdc_print_unsupported_reqs_log_normal(int fd, struct wdc_ocp_C5_unsupported_reqs *log_data)
+static void wdc_print_unsupported_reqs_log_normal(struct wdc_ocp_C5_unsupported_reqs *log_data)
{
int j;
printf("Unsupported Requirements/C5 Log Page Data \n");
@@ -6393,7 +6392,7 @@ static int wdc_print_latency_monitor_log(int fd, struct wdc_ssd_latency_monitor_
return 0;
}
-static int wdc_print_error_rec_log(int fd, struct wdc_ocp_c1_error_recovery_log *log_data, int fmt)
+static int wdc_print_error_rec_log(struct wdc_ocp_c1_error_recovery_log *log_data, int fmt)
{
if (!log_data) {
fprintf(stderr, "ERROR : WDC : Invalid C1 log data buffer\n");
@@ -6401,7 +6400,7 @@ static int wdc_print_error_rec_log(int fd, struct wdc_ocp_c1_error_recovery_log
}
switch (fmt) {
case NORMAL:
- wdc_print_error_rec_log_normal(fd, log_data);
+ wdc_print_error_rec_log_normal(log_data);
break;
case JSON:
wdc_print_error_rec_log_json(log_data);
@@ -6410,7 +6409,7 @@ static int wdc_print_error_rec_log(int fd, struct wdc_ocp_c1_error_recovery_log
return 0;
}
-static int wdc_print_dev_cap_log(int fd, struct wdc_ocp_C4_dev_cap_log *log_data, int fmt)
+static int wdc_print_dev_cap_log(struct wdc_ocp_C4_dev_cap_log *log_data, int fmt)
{
if (!log_data) {
fprintf(stderr, "ERROR : WDC : Invalid C4 log data buffer\n");
@@ -6418,7 +6417,7 @@ static int wdc_print_dev_cap_log(int fd, struct wdc_ocp_C4_dev_cap_log *log_data
}
switch (fmt) {
case NORMAL:
- wdc_print_dev_cap_log_normal(fd, log_data);
+ wdc_print_dev_cap_log_normal(log_data);
break;
case JSON:
wdc_print_dev_cap_log_json(log_data);
@@ -6427,7 +6426,7 @@ static int wdc_print_dev_cap_log(int fd, struct wdc_ocp_C4_dev_cap_log *log_data
return 0;
}
-static int wdc_print_unsupported_reqs_log(int fd, struct wdc_ocp_C5_unsupported_reqs *log_data, int fmt)
+static int wdc_print_unsupported_reqs_log(struct wdc_ocp_C5_unsupported_reqs *log_data, int fmt)
{
if (!log_data) {
fprintf(stderr, "ERROR : WDC : Invalid C5 log data buffer\n");
@@ -6435,7 +6434,7 @@ static int wdc_print_unsupported_reqs_log(int fd, struct wdc_ocp_C5_unsupported_
}
switch (fmt) {
case NORMAL:
- wdc_print_unsupported_reqs_log_normal(fd, log_data);
+ wdc_print_unsupported_reqs_log_normal(log_data);
break;
case JSON:
wdc_print_unsupported_reqs_log_json(log_data);
@@ -6839,7 +6838,7 @@ static int wdc_get_ocp_c1_log_page(nvme_root_t r, int fd, char *format)
}
/* parse the data */
- wdc_print_error_rec_log(fd, log_data, fmt);
+ wdc_print_error_rec_log(log_data, fmt);
} else {
fprintf(stderr, "ERROR : WDC : Unable to read error recovery (C1) data from buffer\n");
}
@@ -6908,7 +6907,7 @@ static int wdc_get_ocp_c4_log_page(nvme_root_t r, int fd, char *format)
}
/* parse the data */
- wdc_print_dev_cap_log(fd, log_data, fmt);
+ wdc_print_dev_cap_log(log_data, fmt);
} else {
fprintf(stderr, "ERROR : WDC : Unable to read device capabilities (C4) data from buffer\n");
}
@@ -6977,7 +6976,7 @@ static int wdc_get_ocp_c5_log_page(nvme_root_t r, int fd, char *format)
}
/* parse the data */
- wdc_print_unsupported_reqs_log(fd, log_data, fmt);
+ wdc_print_unsupported_reqs_log(log_data, fmt);
} else {
fprintf(stderr, "ERROR : WDC : Unable to read unsupported requirements (C5) data from buffer\n");
}
@@ -7370,7 +7369,7 @@ static int wdc_vs_device_waf(int argc, char **argv, struct command *command,
}
/* get data units written from the smart log page */
- ret = nvme_get_log_smart(fd, cfg.namespace_id, true, &smart_log);
+ ret = nvme_get_log_smart(fd, cfg.namespace_id, false, &smart_log);
if (!ret) {
data_units_written = int128_to_double(smart_log.data_units_written);
}
@@ -8732,7 +8731,6 @@ static int wdc_do_drive_essentials(nvme_root_t r, int fd, char *dir, char *key)
memset(tarFiles,0,sizeof(tarFiles));
memset(tarCmd,0,sizeof(tarCmd));
memset(&timeInfo,0,sizeof(timeInfo));
- memset(&vuLogInput, 0, sizeof(vuLogInput));
if (wdc_get_serial_and_fw_rev(fd, (char *)idSerialNo, (char *)idFwRev))
{
@@ -8838,7 +8836,7 @@ static int wdc_do_drive_essentials(nvme_root_t r, int fd, char *dir, char *key)
/* Get FW Slot log page */
memset(&fw_log, 0, sizeof (struct nvme_firmware_slot));
- ret = nvme_get_log_fw_slot(fd, true, &fw_log);
+ ret = nvme_get_log_fw_slot(fd, false, &fw_log);
if (ret) {
fprintf(stderr, "ERROR : WDC : nvme_fw_log() failed, ret = %d\n", ret);
} else {