From 38fdef226f1a1fa053ab53005abbc184143bff65 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 11 Oct 2011 14:30:06 +0200 Subject: [PATCH 1/1] server: include 32/64-bit in probe Signed-off-by: Jens Axboe --- client.c | 17 +++++++++++++---- server.c | 2 ++ server.h | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/client.c b/client.c index 83bbfc40..7f035c7d 100644 --- a/client.c +++ b/client.c @@ -699,7 +699,7 @@ 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; + const char *os, *arch, *bit; os = fio_get_os_string(probe->os); if (!os) @@ -709,9 +709,18 @@ 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); + 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"; + + 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); diff --git a/server.c b/server.c index ad07a0e9..ac6c2fb8 100644 --- a/server.c +++ b/server.c @@ -398,6 +398,8 @@ static int handle_probe_cmd(struct fio_net_cmd *cmd) probe.os = FIO_OS; probe.arch = FIO_ARCH; + probe.bpp = sizeof(void *); + return fio_net_send_cmd(server_fd, FIO_NET_CMD_PROBE, &probe, sizeof(probe), cmd->tag); } diff --git a/server.h b/server.h index 49f02a6c..46555cee 100644 --- a/server.h +++ b/server.h @@ -74,6 +74,7 @@ struct cmd_probe_pdu { uint8_t fio_patch; uint8_t os; uint8_t arch; + uint8_t bpp; }; struct cmd_single_line_pdu { -- 2.25.1