From d9fb0c7e17b84f144b26d45deeb81f8d2321fb53 Mon Sep 17 00:00:00 2001 From: Tyler Erickson Date: Fri, 18 Aug 2023 11:42:32 -0600 Subject: [PATCH] bug: Pulling in fixes from opensea-common's human readable time function Pulling in a fix to the output for number of days in the human readable time functions since it was truncating things that were longer than 255 days. Signed-off-by: Tyler Erickson --- subprojects/opensea-common | 2 +- subprojects/opensea-operations | 2 +- utils/C/openSeaChest/openSeaChest_GenericTests.c | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/subprojects/opensea-common b/subprojects/opensea-common index 8daf4b6..9b9cd5a 160000 --- a/subprojects/opensea-common +++ b/subprojects/opensea-common @@ -1 +1 @@ -Subproject commit 8daf4b6288f3b68aa8c0826af423aab3a8fe0183 +Subproject commit 9b9cd5acf0cb21b0cb07e091d3ee79bcbfd56f0b diff --git a/subprojects/opensea-operations b/subprojects/opensea-operations index 1f6111b..a640f2b 160000 --- a/subprojects/opensea-operations +++ b/subprojects/opensea-operations @@ -1 +1 @@ -Subproject commit 1f6111bb5aae30e082f06d7e841d796e4a6bb32e +Subproject commit a640f2bcbb6d72b66539deecf5a2e61dedcb0764 diff --git a/utils/C/openSeaChest/openSeaChest_GenericTests.c b/utils/C/openSeaChest/openSeaChest_GenericTests.c index 69c5a66..f3e5bd2 100644 --- a/utils/C/openSeaChest/openSeaChest_GenericTests.c +++ b/utils/C/openSeaChest/openSeaChest_GenericTests.c @@ -30,7 +30,7 @@ // Global Variables // //////////////////////// const char *util_name = "openSeaChest_GenericTests"; -const char *buildVersion = "2.2.1"; +const char *buildVersion = "2.2.2"; //////////////////////////// // functions to declare // @@ -1284,16 +1284,17 @@ int32_t main(int argc, char *argv[]) else { //timed test - uint64_t timeInSeconds = SECONDS_TIME_FLAG + (MINUTES_TIME_FLAG * 60) + (HOURS_TIME_FLAG * 3600); + uint64_t timeInSeconds = C_CAST(uint64_t, SECONDS_TIME_FLAG) + (C_CAST(uint64_t, MINUTES_TIME_FLAG) * UINT64_C(60)) + (C_CAST(uint64_t, HOURS_TIME_FLAG) * UINT64_C(3600)); if (VERBOSITY_QUIET < toolVerbosity) { - uint8_t days = 0, hours = 0, minutes = 0, seconds = 0; + uint16_t days = 0; + uint8_t hours = 0, minutes = 0, seconds = 0; convert_Seconds_To_Displayable_Time(timeInSeconds, NULL, &days, &hours, &minutes, &seconds); - printf("Starting user generic timed test at LBA %"PRIu64" for", USER_GENERIC_START_FLAG); + printf("Starting user generic timed test at LBA %" PRIu64 " for", USER_GENERIC_START_FLAG); print_Time_To_Screen(NULL, &days, &hours, &minutes, &seconds); printf("\n"); } - if(ERROR_LIMIT_LOGICAL_COUNT) + if (ERROR_LIMIT_LOGICAL_COUNT) { ERROR_LIMIT_FLAG *= C_CAST(uint16_t, deviceList[deviceIter].drive_info.devicePhyBlockSize / deviceList[deviceIter].drive_info.deviceBlockSize); }