From: Jens Axboe Date: Thu, 11 Apr 2013 10:26:55 +0000 (+0200) Subject: to_kmg() -> fio_uint_to_kmg() X-Git-Tag: fio-2.1~58 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=0a428b23d4201c31bde25775ecb5f72801f431d9;hp=14215487825ae9cd1b6b4f064d39c6d5c609ad44;ds=sidebyside to_kmg() -> fio_uint_to_kmg() It's being exported. Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index 67d13c26..504d7d1c 100644 --- a/fio.h +++ b/fio.h @@ -457,6 +457,7 @@ extern int initialize_fio(char *envp[]); */ extern void print_thread_status(void); extern void print_status_init(int); +extern char *fio_uint_to_kmg(unsigned int val); /* * Thread life cycle. Once a thread has a runstate beyond TD_INITIALIZED, it diff --git a/init.c b/init.c index 90521e5f..7563f268 100644 --- a/init.c +++ b/init.c @@ -613,7 +613,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 }; @@ -1005,12 +1005,12 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num) } else { char *c1, *c2, *c3, *c4, *c5, *c6; - c1 = to_kmg(o->min_bs[DDIR_READ]); - c2 = to_kmg(o->max_bs[DDIR_READ]); - c3 = to_kmg(o->min_bs[DDIR_WRITE]); - c4 = to_kmg(o->max_bs[DDIR_WRITE]); - c5 = to_kmg(o->min_bs[DDIR_TRIM]); - c6 = to_kmg(o->max_bs[DDIR_TRIM]); + c1 = fio_uint_to_kmg(o->min_bs[DDIR_READ]); + c2 = fio_uint_to_kmg(o->max_bs[DDIR_READ]); + c3 = fio_uint_to_kmg(o->min_bs[DDIR_WRITE]); + c4 = fio_uint_to_kmg(o->max_bs[DDIR_WRITE]); + c5 = fio_uint_to_kmg(o->min_bs[DDIR_TRIM]); + c6 = fio_uint_to_kmg(o->max_bs[DDIR_TRIM]); log_info("%s: (g=%d): rw=%s, bs=%s-%s/%s-%s/%s-%s," " ioengine=%s, iodepth=%u\n",