From d2333358fb3729de6681ed5cc3ec45cd86b5cfb8 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 11 Oct 2011 15:07:23 +0200 Subject: [PATCH] client: cleanup bit printing Signed-off-by: Jens Axboe --- client.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/client.c b/client.c index 7f035c7d..e443dc3e 100644 --- a/client.c +++ b/client.c @@ -699,7 +699,8 @@ static void handle_eta(struct fio_client *client, struct fio_net_cmd *cmd) static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd) { struct cmd_probe_pdu *probe = (struct cmd_probe_pdu *) cmd->payload; - const char *os, *arch, *bit; + const char *os, *arch; + char bit[16]; os = fio_get_os_string(probe->os); if (!os) @@ -709,14 +710,7 @@ static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd) if (!arch) os = "unknown"; - if (probe->bpp == 2) - bit = "16-bit"; - else if (probe->bpp == 4) - bit = "32-bit"; - else if (probe->bpp == 8) - bit = "64-bit"; - else - bit = "unknown"; + sprintf(bit, "%d-bit", probe->bpp * 8); log_info("hostname=%s, be=%u, %s, os=%s, arch=%s, fio=%u.%u.%u\n", probe->hostname, probe->bigendian, bit, os, arch, -- 2.25.1