X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=init.c;h=2d10498b2eaa31ab0f355c77e0c11fa1cc115f8b;hp=d4a4f339d2a8358de22850fa59f523dca9632181;hb=9746fdbbd89cb202ecf2ee402b79ef215390eaea;hpb=2f122b135b7319ff8dd04dadf31ff28b301051a3;ds=sidebyside diff --git a/init.c b/init.c index d4a4f339..2d10498b 100644 --- a/init.c +++ b/init.c @@ -583,7 +583,7 @@ static int fixup_options(struct thread_data *td) /* * This function leaks the buffer */ -static char *to_kmg(unsigned int val) +char *fio_uint_to_kmg(unsigned int val) { char *buf = malloc(32); char post[] = { 0, 'K', 'M', 'G', 'P', 'E', 0 }; @@ -871,10 +871,10 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, } else { char *c1, *c2, *c3, *c4; - c1 = to_kmg(td->o.min_bs[DDIR_READ]); - c2 = to_kmg(td->o.max_bs[DDIR_READ]); - c3 = to_kmg(td->o.min_bs[DDIR_WRITE]); - c4 = to_kmg(td->o.max_bs[DDIR_WRITE]); + c1 = fio_uint_to_kmg(td->o.min_bs[DDIR_READ]); + c2 = fio_uint_to_kmg(td->o.max_bs[DDIR_READ]); + c3 = fio_uint_to_kmg(td->o.min_bs[DDIR_WRITE]); + c4 = fio_uint_to_kmg(td->o.max_bs[DDIR_WRITE]); log_info("%s: (g=%d): rw=%s, bs=%s-%s/%s-%s," " ioengine=%s, iodepth=%u\n",