]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
ocp-nvme: Add missing data media_dies_offline to smart_extended_log.
authorMinsik Jeon <hmi.jeon@samsung.com>
Wed, 8 Jan 2025 09:52:44 +0000 (18:52 +0900)
committerDaniel Wagner <wagi@monom.org>
Wed, 8 Jan 2025 13:49:13 +0000 (14:49 +0100)
related commit : https://github.com/linux-nvme/nvme-cli/commit/d4b5f77dc862530aed8523da3662ecab3850f0f4

Signed-off-by: Minsik Jeon <hmi.jeon@samsung.com>
plugins/ocp/ocp-print-json.c
plugins/ocp/ocp-print-stdout.c

index 4346239cab0e4980d12c68ba93c32074e0a9335d..e3ce2daf23cb0ab914285e1bfa86364109d79bce 100644 (file)
@@ -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);
                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",
@@ -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",
index 0934b408217817ebcc963674ce5d5ed89ddf7256..5e135873cc0deb7a8aaf2793a77ecb5214d45ba8 100644 (file)
@@ -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",