Adding upstream version 2.1.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
8e91e2f7f6
commit
28d4a2895d
338 changed files with 631 additions and 601 deletions
|
@ -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);
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue