summaryrefslogtreecommitdiffstats
path: root/plugins/ocp/ocp-fw-activation-history.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:11:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:11:05 +0000
commit81d6a5ded50a26338e1b36462b3e0a6e45beb9a6 (patch)
tree364371981040c3dc6e97bb289bda0d33933ebfac /plugins/ocp/ocp-fw-activation-history.c
parentAdding upstream version 2.8. (diff)
downloadnvme-cli-81d6a5ded50a26338e1b36462b3e0a6e45beb9a6.tar.xz
nvme-cli-81d6a5ded50a26338e1b36462b3e0a6e45beb9a6.zip
Adding upstream version 2.9.1.upstream/2.9.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/ocp/ocp-fw-activation-history.c')
-rw-r--r--plugins/ocp/ocp-fw-activation-history.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/ocp/ocp-fw-activation-history.c b/plugins/ocp/ocp-fw-activation-history.c
index ad96c6b..16598a0 100644
--- a/plugins/ocp/ocp-fw-activation-history.c
+++ b/plugins/ocp/ocp-fw-activation-history.c
@@ -66,7 +66,7 @@ static void ocp_fw_activation_history_normal(const struct fw_activation_history
printf(" %-22s%d\n", "activation count:",
le16_to_cpu(entry->activation_count));
printf(" %-22s%"PRIu64"\n", "timestamp:",
- le64_to_cpu(entry->timestamp));
+ (0x0000FFFFFFFFFFFF & le64_to_cpu(entry->timestamp)));
printf(" %-22s%"PRIu64"\n", "power cycle count:",
le64_to_cpu(entry->power_cycle_count));
printf(" %-22s%.*s\n", "previous firmware:", (int)sizeof(entry->previous_fw),
@@ -106,7 +106,7 @@ static void ocp_fw_activation_history_json(const struct fw_activation_history *f
json_object_add_value_uint(entry_obj, "activation count",
le16_to_cpu(entry->activation_count));
json_object_add_value_uint64(entry_obj, "timestamp",
- le64_to_cpu(entry->timestamp));
+ (0x0000FFFFFFFFFFFF & le64_to_cpu(entry->timestamp)));
json_object_add_value_uint(entry_obj, "power cycle count",
le64_to_cpu(entry->power_cycle_count));
@@ -162,7 +162,7 @@ int ocp_fw_activation_history_log(int argc, char **argv, struct command *cmd,
if (err)
return err;
- int uuid_index = 0;
+ __u8 uuid_index = 0;
/*
* Best effort attempt at uuid. Otherwise, assume no index (i.e. 0)