]> sourceware.org Git - lvm2.git/commitdiff
cleanup: use proper activation_change_t
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 21 Aug 2012 13:49:23 +0000 (15:49 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 23 Aug 2012 12:37:38 +0000 (14:37 +0200)
lib/cache/lvmetad.h
lib/metadata/metadata-exported.h
tools/pvscan.c
tools/vgchange.c

index 713c5a308b8f8bd7dda5c349a695c609a6c7af14..932a9f1bf94be989b1ed9dbb6172f627c66c23c4 100644 (file)
 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
 /*
index f39f968785b57c2081cd6d65c53cc0dcdbaf0c5b..0658fade36a528dfab27a37e0fd672374d105d3a 100644 (file)
@@ -571,7 +571,7 @@ const char *get_pool_discards_name(thin_discards_t discards);
 /*
  * Activation options
  */
-typedef enum {
+typedef enum activation_change {
        CHANGE_AY = 0,  /* activate */
        CHANGE_AN = 1,  /* deactivate */
        CHANGE_AE = 2,  /* activate exclusively */
index a846322e9fc03f51f984427bf7ff2714ea066112..6c634e354663c703d6ee30cf63da00d120d78db4 100644 (file)
@@ -97,7 +97,8 @@ static void _pvscan_display_single(struct cmd_context *cmd,
                                           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))
index 2013447b09c62506598d2bcc456877cd07a5eafc..c59d58e0f7f3a51b1a9ae60e65602b2effb87450 100644 (file)
@@ -512,7 +512,8 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name,
        }
 
        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;
        }
 
This page took 0.047882 seconds and 5 git commands to generate.