From: Jens Axboe Date: Tue, 5 Jun 2018 19:33:50 +0000 (-0600) Subject: client: remove 'cmd' argument to stop handler X-Git-Tag: fio-3.8~42 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=36ed2f9a93a486109a87b2c0306ab69d4f930891 client: remove 'cmd' argument to stop handler Signed-off-by: Jens Axboe --- diff --git a/client.c b/client.c index ea1a4d29..96cc35e6 100644 --- 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: { diff --git a/client.h b/client.h index 29e84d0d..a597449d 100644 --- 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; diff --git a/gclient.c b/gclient.c index 5087b6be..bcd7a880 100644 --- 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;