server: more debug dumping
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/client.c b/client.c
index 4d23341..fd9727e 100644
--- a/client.c
+++ b/client.c
@@ -75,7 +75,7 @@
static void remove_client(struct fio_client *client)
{
- dprint(FD_NET, "removed client <%s>\n", client->hostname);
+ dprint(FD_NET, "client: removed <%s>\n", client->hostname);
flist_del(&client->list);
nr_clients--;
@@ -89,9 +89,12 @@
static void __fio_client_add_cmd_option(struct fio_client *client,
const char *opt)
{
- client->argc++;
+ int index;
+
+ index = client->argc++;
client->argv = realloc(client->argv, sizeof(char *) * client->argc);
- client->argv[client->argc - 1] = strdup(opt);
+ client->argv[index] = strdup(opt);
+ dprint(FD_NET, "client: add cmd %d: %s\n", index, opt);
}
void fio_client_add_cmd_option(const char *hostname, const char *opt)
@@ -114,7 +117,7 @@
{
struct fio_client *client;
- dprint(FD_NET, "added client <%s>\n", hostname);
+ dprint(FD_NET, "client: added <%s>\n", hostname);
client = malloc(sizeof(*client));
memset(client, 0, sizeof(*client));
@@ -131,7 +134,7 @@
{
int fd;
- dprint(FD_NET, "connect to host %s\n", client->hostname);
+ dprint(FD_NET, "client: connect to host %s\n", client->hostname);
memset(&client->addr, 0, sizeof(client->addr));
client->addr.sin_family = AF_INET;
@@ -214,7 +217,7 @@
struct cmd_line_pdu *pdu;
int i, ret;
- dprint(FD_NET, "client: send cmdline\n");
+ dprint(FD_NET, "client: send cmdline %d\n", client->argc);
pdu = malloc(sizeof(*pdu));
for (i = 0; i < client->argc; i++)
diff --git a/server.c b/server.c
index 6a228ce..4c12f65 100644
--- a/server.c
+++ b/server.c
@@ -299,8 +299,12 @@
pdu->argc = le16_to_cpu(pdu->argc);
- for (i = 0; i < pdu->argc; i++)
+ dprint(FD_NET, "server: %d command line args\n", pdu->argc);
+
+ for (i = 0; i < pdu->argc; i++) {
argv[i] = (char *) pdu->argv[i];
+ dprint(FD_NET, "server: %d: %s\n", i, argv[i]);
+ }
if (parse_cmd_line(pdu->argc, argv))
return -1;