Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions plugins/ocp/ocp-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@
case 0 ... 1:
break;
default:
case 6:
json_object_add_value_uint(root, "Form factor",
log->form_factor);
json_object_add_value_uint(root, "Die in use bad nand block",
le64_to_cpu(log->die_in_use_bad_nand_block));

Check failure on line 233 in plugins/ocp/ocp-print-json.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 85 exceeds 80 columns
fallthrough;
case 5:
json_object_add_value_uint(root, "NVMe Over Pcie Errata Version",
log->nvme_over_pcie_errate_version);
Expand Down
6 changes: 6 additions & 0 deletions plugins/ocp/ocp-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,12 @@ static void stdout_smart_extended_log(struct ocp_smart_extended_log *log, unsign
case 0 ... 1:
break;
default:
case 6:
printf(" Form factor %d\n",
log->form_factor);
printf(" Die in use bad nand block %"PRIu64"\n",
le64_to_cpu(log->die_in_use_bad_nand_block));
fallthrough;
case 5:
printf(" NVMe Over Pcie Errata Version %d\n",
log->nvme_over_pcie_errate_version);
Expand Down
2 changes: 1 addition & 1 deletion plugins/ocp/ocp-smart-extended-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
return ret;
}

data = malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);
data = (struct ocp_smart_extended_log *) malloc(sizeof(__u8) * C0_SMART_CLOUD_ATTR_LEN);

Check failure on line 45 in plugins/ocp/ocp-smart-extended-log.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 96 exceeds 80 columns
if (!data) {
fprintf(stderr, "ERROR : OCP : malloc : %s\n", strerror(errno));
return -1;
Expand Down
7 changes: 4 additions & 3 deletions plugins/ocp/ocp-smart-extended-log.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct ocp_smart_extended_log {
__le16 total_die_failure_tolerance; /* [219:218] */
__le16 media_dies_offline; /* [221:220] */
__u8 max_temperature_recorded; /* [222] */
__u8 rsvd223; /* [223] */
__u8 form_factor; /* [223] */
__le64 nand_avg_erase_count; /* [231:224] */
__le32 command_timeouts; /* [235:232] */
__le32 sys_area_program_fail_count_raw; /* [239:236] */
Expand All @@ -145,8 +145,9 @@ struct ocp_smart_extended_log {
__u8 lifetime_power_consumed[6]; /* [269:264] */
__u8 dssd_firmware_revision[8]; /* [277:270] */
__u8 dssd_firmware_build_uuid[16]; /* [293:278] */
__u8 dssd_firmware_build_label[64]; /* [375:294] */
__u8 rsvd358[136]; /* [493:358] */
__u8 dssd_firmware_build_label[64]; /* [357:294] */
__le64 die_in_use_bad_nand_block; /* [365:358] */
__u8 rsvd358[128]; /* [493:358] */
__le16 log_page_version; /* [495:494] */
__u8 log_page_guid[16]; /* [511:496] */
};
Expand Down
Loading