Change time parameter type in printing

Type of `dirty_for` in structs needs to be unified.
Values stored in these fields (both in cache and core info structs)
are  unsigned 64-bits ints but `dirty_for`s were unsigned 32-bits ints
(vide changes in OCF).

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski 2021-02-08 10:57:19 +01:00 committed by Kozlowski Mateusz
parent eef4e49904
commit 584ef99143

View File

@ -70,11 +70,11 @@ static float calc_gb(uint32_t clines)
return (float) clines * 4 * KiB / GiB;
}
static void print_dirty_for_time(uint32_t t, FILE *outfile)
static void print_dirty_for_time(uint64_t t, FILE *outfile)
{
uint32_t d, h, m, s;
fprintf(outfile, "%u,[s],", t);
fprintf(outfile, "%lu,[s],", t);
if (!t) {
fprintf(outfile, "Cache clean");
@ -112,7 +112,7 @@ static void print_kv_pair(FILE *outfile, const char *title, const char *fmt, ...
fprintf(outfile, "\n");
}
static void print_kv_pair_time(FILE *outfile, const char *title, uint32_t time)
static void print_kv_pair_time(FILE *outfile, const char *title, uint64_t time)
{
fprintf(outfile, TAG(KV_PAIR) "\"%s\",", title);
print_dirty_for_time(time, outfile);