diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 08:17:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-04-03 08:17:29 +0000 |
commit | 61c4ff8b2ddc3841050c17a5f87791653dbd2b7b (patch) | |
tree | e97b4f25c511372d73bdd96c389c5f468d99138a /plugins/solidigm/solidigm-telemetry/header.c | |
parent | Adding upstream version 2.4. (diff) | |
download | nvme-cli-upstream/2.4+really2.3.tar.xz nvme-cli-upstream/2.4+really2.3.zip |
Adding upstream version 2.4+really2.3.upstream/2.4+really2.3
This reverts commit f42531334c05b7f49ae43c0a27e347a487fb2667.
Diffstat (limited to 'plugins/solidigm/solidigm-telemetry/header.c')
-rw-r--r-- | plugins/solidigm/solidigm-telemetry/header.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/plugins/solidigm/solidigm-telemetry/header.c b/plugins/solidigm/solidigm-telemetry/header.c index d085c24..72b2d97 100644 --- a/plugins/solidigm/solidigm-telemetry/header.c +++ b/plugins/solidigm/solidigm-telemetry/header.c @@ -63,10 +63,10 @@ static_assert(sizeof(const struct reason_indentifier_1_2) == #pragma pack(pop, reason_indentifier) static void telemetry_log_reason_id_parse1_0_ext(const struct telemetry_log *tl, - struct json_object *reason_id) + json_object *reason_id) { const struct reason_indentifier_1_0 *ri; - struct json_object *reserved; + json_object *reserved; ri = (struct reason_indentifier_1_0 *) tl->log->rsnident; json_object_object_add(reason_id, "FirmwareVersion", json_object_new_string_len(ri->FirmwareVersion, sizeof(ri->FirmwareVersion))); @@ -76,16 +76,16 @@ static void telemetry_log_reason_id_parse1_0_ext(const struct telemetry_log *tl, reserved = json_create_array(); json_object_add_value_array(reason_id, "Reserved", reserved); for ( int i=0; i < sizeof(ri->Reserved); i++) { - struct json_object *val = json_object_new_int(ri->Reserved[i]); + json_object *val = json_object_new_int(ri->Reserved[i]); json_object_array_add(reserved, val); } } static void telemetry_log_reason_id_parse1_1_ext(const struct telemetry_log *tl, - struct json_object *reason_id) + json_object *reason_id) { const struct reason_indentifier_1_1 *ri; - struct json_object *reserved; + json_object *reserved; ri = (struct reason_indentifier_1_1 *) tl->log->rsnident; json_object_object_add(reason_id, "FirmwareVersion", json_object_new_string_len(ri->FirmwareVersion, sizeof(ri->FirmwareVersion))); @@ -98,17 +98,17 @@ static void telemetry_log_reason_id_parse1_1_ext(const struct telemetry_log *tl, reserved = json_create_array(); json_object_add_value_array(reason_id, "Reserved", reserved); for (int i = 0; i < sizeof(ri->Reserved); i++) { - struct json_object *val = json_object_new_int(ri->Reserved[i]); + json_object *val = json_object_new_int(ri->Reserved[i]); json_object_array_add(reserved, val); } } static void telemetry_log_reason_id_parse1_2_ext(const struct telemetry_log *tl, - struct json_object *reason_id) + json_object *reason_id) { const struct reason_indentifier_1_2 *ri; - struct json_object *dp_reserved; - struct json_object *reserved; + json_object *dp_reserved; + json_object *reserved; ri = (struct reason_indentifier_1_2 *) tl->log->rsnident; @@ -121,19 +121,19 @@ static void telemetry_log_reason_id_parse1_2_ext(const struct telemetry_log *tl, reserved = json_create_array(); json_object_add_value_array(reason_id, "Reserved2", reserved); for (int i = 0; i < sizeof(ri->Reserved2); i++) { - struct json_object *val = json_object_new_int(ri->Reserved2[i]); + json_object *val = json_object_new_int(ri->Reserved2[i]); json_object_array_add(reserved, val); } dp_reserved = json_create_array(); json_object_add_value_array(reason_id, "DualPortReserved", dp_reserved); for (int i = 0; i < sizeof(ri->DualPortReserved); i++) { - struct json_object *val = json_object_new_int(ri->DualPortReserved[i]); + json_object *val = json_object_new_int(ri->DualPortReserved[i]); json_object_array_add(dp_reserved, val); } } -static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *tl, struct json_object *reason_id) +static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *tl, json_object *reason_id) { const struct reason_indentifier_1_0 *ri1_0 = (struct reason_indentifier_1_0 *) tl->log->rsnident; @@ -161,9 +161,9 @@ static void solidigm_telemetry_log_reason_id_parse(const struct telemetry_log *t bool solidigm_telemetry_log_header_parse(const struct telemetry_log *tl) { const struct nvme_telemetry_log *log; - struct json_object *ieee_oui_id; - struct json_object *reason_id; - struct json_object *header; + json_object *ieee_oui_id; + json_object *reason_id; + json_object *header; if (tl->log_size < sizeof(const struct nvme_telemetry_log)) { SOLIDIGM_LOG_WARNING("Telemetry log too short."); @@ -180,7 +180,7 @@ bool solidigm_telemetry_log_header_parse(const struct telemetry_log *tl) json_object_object_add(header, "ieeeOuiIdentifier", ieee_oui_id); for (int i = 0; i < sizeof(log->ieee); i++) { - struct json_object *val = json_object_new_int(log->ieee[i]); + json_object *val = json_object_new_int(log->ieee[i]); json_object_array_add(ieee_oui_id, val); } |