ppc64-diag/ppc64-diag-2.7.9-improvements_status_and_err_messages.patch
Than Ngo 7a4d6633db - man and help of diag_nvme are not in sync
- compiler warnings
- diag_nvme: call_home command fails on nvmf drive
- rtas_errd: Fix core dump with large filename passed to -f option

Resolves: RHEL-55398
2024-12-03 10:19:47 +01:00

38 lines
1.2 KiB
Diff

commit 3ad587d20868f154bb7ab972ee7812add1380d7a
Author: Greg Joyce <gjoyce@linux.vnet.ibm.com>
Date: Wed Oct 11 12:10:40 2023 -0500
diag_nvme: improvements to status and err messages
Signed-off-by: Greg Joyce <gjoyce@linux.vnet.ibm.com>
diff --git a/diags/diag_nvme.c b/diags/diag_nvme.c
index df191f2..00efec2 100644
--- a/diags/diag_nvme.c
+++ b/diags/diag_nvme.c
@@ -166,9 +166,9 @@ int main(int argc, char *argv[]) {
}
if (rc == 0)
- fprintf(stdout, "Command completed successfully\n");
+ fprintf(stdout, "NVMe diag command completed successfully\n");
else
- fprintf(stderr, "Command failed, exiting with rc %d\n", rc);
+ fprintf(stderr, "NVMe diag command failed with rc %d\n", rc);
return rc;
}
@@ -724,8 +724,11 @@ extern int get_smart_file(char *file_path, struct nvme_smart_log_page *log) {
int num_elements = 0;
struct dictionary dict[MAX_DICT_ELEMENTS];
- if ((num_elements = read_file_dict(file_path, dict, MAX_DICT_ELEMENTS)) < 0)
+ if ((num_elements = read_file_dict(file_path, dict, MAX_DICT_ELEMENTS)) < 0) {
+ fprintf(stderr, "read_file_dict failed: %s, rc % d\n",
+ file_path, num_elements);
return num_elements;
+ }
return set_smart_log_field(log, dict, num_elements);
}