server: include 32/64-bit in probe
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Oct 2011 12:30:06 +0000 (14:30 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Oct 2011 12:30:06 +0000 (14:30 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c
server.c
server.h

index 83bbfc40f6050af097253b50113331bfb18092f0..7f035c7d7804e764e1557c1fee1af1641d971038 100644 (file)
--- 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);
index ad07a0e973e9b0ea6c813bad37dfe2b0c21d1012..ac6c2fb8969da75f15c05def7e313f01ca162137 100644 (file)
--- 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);
 }
 
index 49f02a6cd55ddd23c817cf9e382fd8d7e9e8c127..46555ceea491444df213497564d23c227789d075 100644 (file)
--- 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 {