From 0dca717b7e9e3bda528e96a4d73e57d03a70ca86 Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Sat, 31 Aug 2024 03:49:45 +0900 Subject: [PATCH] util: extern uint128_t_to_double() function Use the function to calculate with the uint128_t value. Signed-off-by: Tokunori Ikegami --- util/types.c | 2 +- util/types.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/util/types.c b/util/types.c index 376c7343..20c121b1 100644 --- a/util/types.c +++ b/util/types.c @@ -48,7 +48,7 @@ uint64_t int48_to_long(__u8 *data) return result; } -static long double uint128_t_to_double(nvme_uint128_t data) +long double uint128_t_to_double(nvme_uint128_t data) { long double result = 0; int i; diff --git a/util/types.h b/util/types.h index 9e0806c2..b2e8fc8d 100644 --- a/util/types.h +++ b/util/types.h @@ -41,6 +41,7 @@ uint64_t int48_to_long(__u8 *data); char *uint128_t_to_string(nvme_uint128_t val); char *uint128_t_to_l10n_string(nvme_uint128_t val); char *uint128_t_to_si_string(nvme_uint128_t val, __u32 bytes_per_unit); +long double uint128_t_to_double(nvme_uint128_t data); const char *util_uuid_to_string(unsigned char uuid[NVME_UUID_LEN]); const char *util_fw_to_string(char *c); -- 2.50.1