Skip to content

Commit

Permalink
bug: Pulling in fixes from opensea-common's human readable time function
Browse files Browse the repository at this point in the history
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 <tyler.erickson@seagate.com>
  • Loading branch information
vonericsen committed Aug 18, 2023
1 parent a55c07a commit d9fb0c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion subprojects/opensea-common
11 changes: 6 additions & 5 deletions utils/C/openSeaChest/openSeaChest_GenericTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 //
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit d9fb0c7

Please sign in to comment.