Skip to content
Merged
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
8 changes: 6 additions & 2 deletions plugins/ocp/ocp-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,10 @@ static void json_smart_extended_log_v1(struct ocp_smart_extended_log *log)
le16_to_cpu(log->total_media_dies));
json_object_add_value_uint(root, "Total die failure tolerance",
le16_to_cpu(log->total_die_failure_tolerance));
json_object_add_value_uint(root, "Media dies offline",
le16_to_cpu(log->media_dies_offline));
json_object_add_value_uint(root, "Max temperature recorded",
le16_to_cpu(log->max_temperature_recorded));
log->max_temperature_recorded);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping le16_to_cpu looks wrong.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a forget it, it's a u8

json_object_add_value_uint64(root, "Nand avg erase count",
le64_to_cpu(log->nand_avg_erase_count));
json_object_add_value_uint(root, "Command timeouts",
Expand Down Expand Up @@ -399,8 +401,10 @@ static void json_smart_extended_log_v2(struct ocp_smart_extended_log *log)
le16_to_cpu(log->total_media_dies));
json_object_add_value_uint(root, "total_die_failure_tolerance",
le16_to_cpu(log->total_die_failure_tolerance));
json_object_add_value_uint(root, "media_dies_offline",
le16_to_cpu(log->media_dies_offline));
json_object_add_value_uint(root, "max_temperature_recorded",
le16_to_cpu(log->max_temperature_recorded));
log->max_temperature_recorded);
json_object_add_value_uint64(root, "nand_avg_erase_count",
le64_to_cpu(log->nand_avg_erase_count));
json_object_add_value_uint(root, "command_timeouts",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ocp/ocp-print-stdout.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static void stdout_smart_extended_log(struct ocp_smart_extended_log *log, unsign
printf(" Media dies offline %"PRIu16"\n",
le16_to_cpu(log->media_dies_offline));
printf(" Max temperature recorded %d\n",
le16_to_cpu(log->max_temperature_recorded));
log->max_temperature_recorded);
printf(" Nand avg erase count %"PRIu64"\n",
le64_to_cpu(log->nand_avg_erase_count));
printf(" Command timeouts %"PRIu32"\n",
Expand Down
Loading