struct volume_group;
struct cmd_context;
struct dm_config_tree;
+typedef enum activation_change activation_change_t;
-typedef int (*activation_handler) (struct volume_group *vg, int partial, int activate);
+typedef int (*activation_handler) (struct volume_group *vg, int partial,
+ activation_change_t activate);
#ifdef LVMETAD_SUPPORT
/*
/*
* Activation options
*/
-typedef enum {
+typedef enum activation_change {
CHANGE_AY = 0, /* activate */
CHANGE_AN = 1, /* deactivate */
CHANGE_AE = 2, /* activate exclusively */
pv_pe_size(pv)));
}
-static int _auto_activation_handler(struct volume_group *vg, int partial, int activate)
+static int _auto_activation_handler(struct volume_group *vg, int partial,
+ activation_change_t activate)
{
/* TODO: add support for partial and clustered VGs */
if (partial || vg_is_clustered(vg))
}
if (arg_count(cmd, activate_ARG)) {
- if (!vgchange_activate(cmd, vg, arg_uint_value(cmd, activate_ARG, CHANGE_AY)))
+ if (!vgchange_activate(cmd, vg, (activation_change_t)
+ arg_uint_value(cmd, activate_ARG, CHANGE_AY)))
return ECMD_FAILED;
}