client: remove 'cmd' argument to stop handler
authorJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 19:33:50 +0000 (13:33 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 19:38:09 +0000 (13:38 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
client.c
client.h
gclient.c

index ea1a4d292d9899abf1b0bd9638673b020a08fbda..96cc35e66bdc9c44f8991aec8ce9ab7bdc44dcf2 100644 (file)
--- a/client.c
+++ b/client.c
@@ -28,7 +28,7 @@ static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd);
 static void handle_gs(struct fio_client *client, struct fio_net_cmd *cmd);
 static void handle_probe(struct fio_client *client, struct fio_net_cmd *cmd);
 static void handle_text(struct fio_client *client, struct fio_net_cmd *cmd);
-static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd);
+static void handle_stop(struct fio_client *client);
 static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd);
 
 static void convert_text(struct fio_net_cmd *cmd);
@@ -1441,7 +1441,7 @@ static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd)
        sum_stat_clients += client->nr_stat;
 }
 
-static void handle_stop(struct fio_client *client, struct fio_net_cmd *cmd)
+static void handle_stop(struct fio_client *client)
 {
        if (client->error)
                log_info("client <%s>: exited with error %d\n", client->hostname, client->error);
@@ -1744,7 +1744,7 @@ int fio_handle_client(struct fio_client *client)
                client->state = Client_stopped;
                client->error = le32_to_cpu(pdu->error);
                client->signal = le32_to_cpu(pdu->signal);
-               ops->stop(client, cmd);
+               ops->stop(client);
                break;
                }
        case FIO_NET_CMD_ADD_JOB: {
index 29e84d0dc2a126debde76105fd13cf35ecafc439..a597449dcbb218cff12dc36da09001e9bd5bc084 100644 (file)
--- a/client.h
+++ b/client.h
@@ -77,6 +77,7 @@ struct fio_client {
 };
 
 typedef void (client_cmd_op)(struct fio_client *, struct fio_net_cmd *);
+typedef void (client_op)(struct fio_client *);
 typedef void (client_eta_op)(struct jobs_eta *je);
 typedef void (client_timed_out_op)(struct fio_client *);
 typedef void (client_jobs_eta_op)(struct fio_client *client, struct jobs_eta *je);
@@ -95,7 +96,7 @@ struct client_ops {
        client_cmd_op           *add_job;
        client_cmd_op           *update_job;
        client_timed_out_op     *timed_out;
-       client_cmd_op           *stop;
+       client_op               *stop;
        client_cmd_op           *start;
        client_cmd_op           *job_start;
        client_timed_out_op     *removed;
index 5087b6befc0557b2e354cc5b161d4edf80b5e06f..bcd7a8808f705e932380819757ebcb6314852b78 100644 (file)
--- a/gclient.c
+++ b/gclient.c
@@ -641,7 +641,7 @@ static void gfio_client_timed_out(struct fio_client *client)
        gdk_threads_leave();
 }
 
-static void gfio_client_stop(struct fio_client *client, struct fio_net_cmd *cmd)
+static void gfio_client_stop(struct fio_client *client)
 {
        struct gfio_client *gc = client->client_data;