diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-07-31 15:03:03 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-07-31 15:03:03 -0600 |
commit | 79c77d043578272d9be95096bdb6daebb70c7817 (patch) | |
tree | 7326ef2d937d1af506784fd028b343df24565e73 | |
parent | 824912be19542f94264e485a25d37b55a9f68f0e (diff) | |
parent | febae487985a8b63185fe8ac4c1623dd2ad3cf58 (diff) | |
download | fio-79c77d043578272d9be95096bdb6daebb70c7817.tar.gz |
Merge branch 'improment/constness' of https://github.com/dpronin/fio
* 'improment/constness' of https://github.com/dpronin/fio:
use 'const' where it is required
-rw-r--r-- | client.c | 10 | ||||
-rw-r--r-- | client.h | 8 |
2 files changed, 9 insertions, 9 deletions
@@ -34,7 +34,7 @@ static void handle_start(struct fio_client *client, struct fio_net_cmd *cmd); static void convert_text(struct fio_net_cmd *cmd); static void client_display_thread_status(struct jobs_eta *je); -struct client_ops fio_client_ops = { +struct client_ops const fio_client_ops = { .text = handle_text, .disk_util = handle_du, .thread_status = handle_ts, @@ -446,7 +446,7 @@ int fio_client_add_ini_file(void *cookie, const char *ini_file, bool remote) return 0; } -int fio_client_add(struct client_ops *ops, const char *hostname, void **cookie) +int fio_client_add(struct client_ops const *ops, const char *hostname, void **cookie) { struct fio_client *existing = *cookie; struct fio_client *client; @@ -1772,7 +1772,7 @@ fail: int fio_handle_client(struct fio_client *client) { - struct client_ops *ops = client->ops; + struct client_ops const *ops = client->ops; struct fio_net_cmd *cmd; dprint(FD_NET, "client: handle %s\n", client->hostname); @@ -1957,7 +1957,7 @@ int fio_clients_send_trigger(const char *cmd) return 0; } -static void request_client_etas(struct client_ops *ops) +static void request_client_etas(struct client_ops const *ops) { struct fio_client *client; struct flist_head *entry; @@ -2089,7 +2089,7 @@ static int fio_check_clients_timed_out(void) return ret; } -int fio_handle_clients(struct client_ops *ops) +int fio_handle_clients(struct client_ops const *ops) { struct pollfd *pfds; int i, ret = 0, retval = 0; @@ -69,7 +69,7 @@ struct fio_client { uint16_t argc; char **argv; - struct client_ops *ops; + struct client_ops const *ops; void *client_data; struct client_file *files; @@ -84,7 +84,7 @@ 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); -extern struct client_ops fio_client_ops; +extern struct client_ops const fio_client_ops; struct client_ops { client_cmd_op *text; @@ -128,8 +128,8 @@ extern int fio_start_client(struct fio_client *); extern int fio_start_all_clients(void); extern int fio_clients_send_ini(const char *); extern int fio_client_send_ini(struct fio_client *, const char *, bool); -extern int fio_handle_clients(struct client_ops *); -extern int fio_client_add(struct client_ops *, const char *, void **); +extern int fio_handle_clients(struct client_ops const*); +extern int fio_client_add(struct client_ops const*, const char *, void **); extern struct fio_client *fio_client_add_explicit(struct client_ops *, const char *, int, int); extern void fio_client_add_cmd_option(void *, const char *); extern int fio_client_add_ini_file(void *, const char *, bool); |