Skip to content

Commit 0973f27

Browse files
martin-gpyigaw
authored andcommitted
nvme-print: sanitize error-log output
Minor textual and formatting changes to the error-log output. Signed-off-by: Martin George <marting@netapp.com>
1 parent 97a8584 commit 0973f27

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

nvme-print-stdout.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -3662,7 +3662,7 @@ static void stdout_error_log(struct nvme_error_log_page *err_log, int entries,
36623662
le64_to_cpu(err_log[i].error_count));
36633663
printf("sqid : %d\n", err_log[i].sqid);
36643664
printf("cmdid : %#x\n", err_log[i].cmdid);
3665-
printf("status_field : %#x(%s)\n", status,
3665+
printf("status_field : %#x (%s)\n", status,
36663666
nvme_status_to_string(status, false));
36673667
printf("phase_tag : %#x\n",
36683668
le16_to_cpu(err_log[i].status_field & 0x1));
@@ -3672,7 +3672,7 @@ static void stdout_error_log(struct nvme_error_log_page *err_log, int entries,
36723672
le64_to_cpu(err_log[i].lba));
36733673
printf("nsid : %#x\n", err_log[i].nsid);
36743674
printf("vs : %d\n", err_log[i].vs);
3675-
printf("trtype : %s\n",
3675+
printf("trtype : %#x (%s)\n", err_log[i].trtype,
36763676
nvme_trtype_to_string(err_log[i].trtype));
36773677
printf("csi : %d\n", err_log[i].csi);
36783678
printf("opcode : %#x\n", err_log[i].opcode);

nvme-print.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -678,11 +678,11 @@ const char *nvme_trtype_to_string(__u8 trtype)
678678
{
679679
switch (trtype) {
680680
case 0: return "The transport type is not indicated or the error "\
681-
"is not transport related.";
682-
case 1: return "RDMA Transport error.";
683-
case 2: return "Fibre Channel Transport error.";
684-
case 3: return "TCP Transport error.";
685-
case 254: return "Intra-host Transport error.";
681+
"is not transport related";
682+
case 1: return "RDMA Transport error";
683+
case 2: return "Fibre Channel Transport error";
684+
case 3: return "TCP Transport error";
685+
case 254: return "Intra-host Transport error";
686686
default: return "Reserved";
687687
};
688688
}

0 commit comments

Comments
 (0)