client: cleanup bit printing
[fio.git] / client.c
index 31b4862775eb159775d2fa784a28a9032cc600f6..e443dc3eeba3b502c097041a3553c04a3589ca04 100644 (file)
--- a/client.c
+++ b/client.c
@@ -663,7 +663,7 @@ static void remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
        flist_for_each(entry, &client->cmd_list) {
                icmd = flist_entry(entry, struct fio_net_int_cmd, list);
 
-               if (cmd->tag == (uint64_t) icmd)
+               if (cmd->tag == (uintptr_t) icmd)
                        break;
 
                icmd = NULL;
@@ -682,7 +682,7 @@ static void remove_reply_cmd(struct fio_client *client, struct fio_net_cmd *cmd)
 static void handle_eta(struct fio_client *client, struct fio_net_cmd *cmd)
 {
        struct jobs_eta *je = (struct jobs_eta *) cmd->payload;
-       struct client_eta *eta = (struct client_eta *) cmd->tag;
+       struct client_eta *eta = (struct client_eta *) (uintptr_t) cmd->tag;
 
        dprint(FD_NET, "client: got eta tag %p, %d\n", eta, eta->pending);
 
@@ -700,6 +700,7 @@ 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;
+       char bit[16];
 
        os = fio_get_os_string(probe->os);
        if (!os)
@@ -709,9 +710,11 @@ static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd)
        if (!arch)
                os = "unknown";
 
-       log_info("hostname=%s, be=%u, os=%s, arch=%s, fio=%u.%u.%u\n",
-               probe->hostname, probe->bigendian, os, arch, probe->fio_major,
-               probe->fio_minor, probe->fio_patch);
+       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,
+               probe->fio_major, probe->fio_minor, probe->fio_patch);
 
        if (!client->name)
                client->name = strdup((char *) probe->hostname);
@@ -810,7 +813,7 @@ static void request_client_etas(void)
                flist_add_tail(&client->eta_list, &eta_list);
                client->eta_in_flight = eta;
                fio_net_send_simple_cmd(client->fd, FIO_NET_CMD_SEND_ETA,
-                                       (uint64_t) eta, &client->cmd_list);
+                                       (uintptr_t) eta, &client->cmd_list);
        }
 
        while (skipped--)