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:
parent
eef4e49904
commit
584ef99143
@ -70,11 +70,11 @@ static float calc_gb(uint32_t clines)
|
|||||||
return (float) clines * 4 * KiB / GiB;
|
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;
|
uint32_t d, h, m, s;
|
||||||
|
|
||||||
fprintf(outfile, "%u,[s],", t);
|
fprintf(outfile, "%lu,[s],", t);
|
||||||
|
|
||||||
if (!t) {
|
if (!t) {
|
||||||
fprintf(outfile, "Cache clean");
|
fprintf(outfile, "Cache clean");
|
||||||
@ -112,7 +112,7 @@ static void print_kv_pair(FILE *outfile, const char *title, const char *fmt, ...
|
|||||||
fprintf(outfile, "\n");
|
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);
|
fprintf(outfile, TAG(KV_PAIR) "\"%s\",", title);
|
||||||
print_dirty_for_time(time, outfile);
|
print_dirty_for_time(time, outfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user