diff --git a/lib/lvmpolld/polldaemon.h b/lib/lvmpolld/polldaemon.h index 40ce7a546..ebb90bcb0 100644 --- a/lib/lvmpolld/polldaemon.h +++ b/lib/lvmpolld/polldaemon.h @@ -59,12 +59,12 @@ struct daemon_parms { unsigned progress_display; const char *progress_title; uint64_t lv_type; - struct poll_functions *poll_fns; + const struct poll_functions *poll_fns; char devicesfile[128]; }; int poll_daemon(struct cmd_context *cmd, unsigned background, - uint64_t lv_type, struct poll_functions *poll_fns, + uint64_t lv_type, const struct poll_functions *poll_fns, const char *progress_title, struct poll_operation_id *id); progress_t poll_mirror_progress(struct cmd_context *cmd, diff --git a/tools/lvconvert.c b/tools/lvconvert.c index 6cd26f0e0..674bfe537 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -277,17 +277,17 @@ static int _read_params(struct cmd_context *cmd, struct lvconvert_params *lp) } -static struct poll_functions _lvconvert_mirror_fns = { +static const struct poll_functions _lvconvert_mirror_fns = { .poll_progress = poll_mirror_progress, .finish_copy = lvconvert_mirror_finish, }; -static struct poll_functions _lvconvert_merge_fns = { +static const struct poll_functions _lvconvert_merge_fns = { .poll_progress = poll_merge_progress, .finish_copy = lvconvert_merge_finish, }; -static struct poll_functions _lvconvert_thin_merge_fns = { +static const struct poll_functions _lvconvert_thin_merge_fns = { .poll_progress = poll_thin_merge_progress, .finish_copy = lvconvert_merge_finish, }; diff --git a/tools/lvpoll.c b/tools/lvpoll.c index a4a698b8e..b12b96d2b 100644 --- a/tools/lvpoll.c +++ b/tools/lvpoll.c @@ -19,23 +19,23 @@ #include "lvconvert_poll.h" #include "daemons/lvmpolld/polling_ops.h" -static struct poll_functions _pvmove_fns = { +static const struct poll_functions _pvmove_fns = { .poll_progress = poll_mirror_progress, .update_metadata = pvmove_update_metadata, .finish_copy = pvmove_finish }; -static struct poll_functions _convert_fns = { +static const struct poll_functions _convert_fns = { .poll_progress = poll_mirror_progress, .finish_copy = lvconvert_mirror_finish }; -static struct poll_functions _merge_fns = { +static const struct poll_functions _merge_fns = { .poll_progress = poll_merge_progress, .finish_copy = lvconvert_merge_finish }; -static struct poll_functions _thin_merge_fns = { +static const struct poll_functions _thin_merge_fns = { .poll_progress = poll_thin_merge_progress, .finish_copy = lvconvert_merge_finish }; diff --git a/tools/polldaemon.c b/tools/polldaemon.c index b6392c340..730dfbcbb 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -648,7 +648,7 @@ static int _poll_daemon(struct cmd_context *cmd, struct poll_operation_id *id, } static int _daemon_parms_init(struct cmd_context *cmd, struct daemon_parms *parms, - unsigned background, struct poll_functions *poll_fns, + unsigned background, const struct poll_functions *poll_fns, const char *progress_title, uint64_t lv_type) { sign_t interval_sign; @@ -687,7 +687,7 @@ static int _daemon_parms_init(struct cmd_context *cmd, struct daemon_parms *parm } int poll_daemon(struct cmd_context *cmd, unsigned background, - uint64_t lv_type, struct poll_functions *poll_fns, + uint64_t lv_type, const struct poll_functions *poll_fns, const char *progress_title, struct poll_operation_id *id) { struct daemon_parms parms; diff --git a/tools/pvmove.c b/tools/pvmove.c index c5f9d545e..a43ad006e 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -786,7 +786,7 @@ static int _pvmove_read_single(struct cmd_context *cmd, return ret; } -static struct poll_functions _pvmove_fns = { +static const struct poll_functions _pvmove_fns = { .get_copy_name_from_lv = get_pvmove_pvname_from_lv_mirr, .poll_progress = poll_mirror_progress, .update_metadata = pvmove_update_metadata,