Skip to content

Commit 012c17b

Browse files
hmi-jeonigaw
authored andcommitted
ocp-nvme: Add missing data media_dies_offline to smart_extended_log.
related commit : d4b5f77 Signed-off-by: Minsik Jeon <[email protected]>
1 parent d4b5f77 commit 012c17b

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

plugins/ocp/ocp-print-json.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,10 @@ static void json_smart_extended_log_v1(struct ocp_smart_extended_log *log)
239239
le16_to_cpu(log->total_media_dies));
240240
json_object_add_value_uint(root, "Total die failure tolerance",
241241
le16_to_cpu(log->total_die_failure_tolerance));
242+
json_object_add_value_uint(root, "Media dies offline",
243+
le16_to_cpu(log->media_dies_offline));
242244
json_object_add_value_uint(root, "Max temperature recorded",
243-
le16_to_cpu(log->max_temperature_recorded));
245+
log->max_temperature_recorded);
244246
json_object_add_value_uint64(root, "Nand avg erase count",
245247
le64_to_cpu(log->nand_avg_erase_count));
246248
json_object_add_value_uint(root, "Command timeouts",
@@ -399,8 +401,10 @@ static void json_smart_extended_log_v2(struct ocp_smart_extended_log *log)
399401
le16_to_cpu(log->total_media_dies));
400402
json_object_add_value_uint(root, "total_die_failure_tolerance",
401403
le16_to_cpu(log->total_die_failure_tolerance));
404+
json_object_add_value_uint(root, "media_dies_offline",
405+
le16_to_cpu(log->media_dies_offline));
402406
json_object_add_value_uint(root, "max_temperature_recorded",
403-
le16_to_cpu(log->max_temperature_recorded));
407+
log->max_temperature_recorded);
404408
json_object_add_value_uint64(root, "nand_avg_erase_count",
405409
le64_to_cpu(log->nand_avg_erase_count));
406410
json_object_add_value_uint(root, "command_timeouts",

plugins/ocp/ocp-print-stdout.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ static void stdout_smart_extended_log(struct ocp_smart_extended_log *log, unsign
184184
printf(" Media dies offline %"PRIu16"\n",
185185
le16_to_cpu(log->media_dies_offline));
186186
printf(" Max temperature recorded %d\n",
187-
le16_to_cpu(log->max_temperature_recorded));
187+
log->max_temperature_recorded);
188188
printf(" Nand avg erase count %"PRIu64"\n",
189189
le64_to_cpu(log->nand_avg_erase_count));
190190
printf(" Command timeouts %"PRIu32"\n",

0 commit comments

Comments
 (0)