summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2012-03-01 21:14:43 +0000
committerZdenek Kabelac <zkabelac@redhat.com>2012-03-01 21:14:43 +0000
commitf3c177312f1ee0881c4c4ce0126b9c2ec45b92dd (patch)
tree570bb9a27e312a9b5658d04234b1252e7fd7e8b8
parentc45230754324ab46db86ee21036524ae0cb536e6 (diff)
downloadlvm2-f3c177312f1ee0881c4c4ce0126b9c2ec45b92dd.tar.gz
lvm2-f3c177312f1ee0881c4c4ce0126b9c2ec45b92dd.tar.xz
lvm2-f3c177312f1ee0881c4c4ce0126b9c2ec45b92dd.zip
Correct enum type
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
-rw-r--r--daemons/clvmd/clvmd-command.c2
-rw-r--r--daemons/clvmd/clvmd.c6
-rw-r--r--tools/lvconvert.c4
-rw-r--r--tools/toollib.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/daemons/clvmd/clvmd-command.c b/daemons/clvmd/clvmd-command.c
index 540622ba..64008fdc 100644
--- a/daemons/clvmd/clvmd-command.c
+++ b/daemons/clvmd/clvmd-command.c
@@ -153,7 +153,7 @@ int do_command(struct local_client *client, struct clvm_header *msg, int msglen,
break;
case CLVMD_CMD_SET_DEBUG:
- clvmd_set_debug(args[0]);
+ clvmd_set_debug((debug_t) args[0]);
break;
case CLVMD_CMD_RESTART:
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index f6ce3fdc..dc81fcbf 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -343,7 +343,7 @@ int main(int argc, char *argv[])
int start_timeout = 0;
if_type_t cluster_iface = IF_AUTO;
sigset_t ss;
- int debug_opt = 0;
+ debug_t debug_opt = DEBUG_OFF;
debug_t debug_arg = DEBUG_OFF;
int clusterwide_opt = 0;
mode_t old_mask;
@@ -383,8 +383,8 @@ int main(int argc, char *argv[])
break;
case 'd':
- debug_opt = 1;
- debug_arg = optarg ? atoi(optarg) : DEBUG_STDERR;
+ debug_opt = DEBUG_STDERR;
+ debug_arg = optarg ? (debug_t) atoi(optarg) : DEBUG_STDERR;
if (debug_arg == DEBUG_STDERR)
foreground_mode = 1;
break;
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index a8d35547..654e1158 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -203,7 +203,7 @@ static int _read_params(struct lvconvert_params *lp, struct cmd_context *cmd,
lp->mirrors_sign = arg_sign_value(cmd, mirrors_ARG, SIGN_NONE);
}
- lp->alloc = arg_uint_value(cmd, alloc_ARG, ALLOC_INHERIT);
+ lp->alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, ALLOC_INHERIT);
/* There are three types of lvconvert. */
if (lp->merge) { /* Snapshot merge */
@@ -1236,7 +1236,7 @@ int mirror_remove_missing(struct cmd_context *cmd,
if (force && _failed_mirrors_count(lv) == lv_mirror_count(lv)) {
log_error("No usable images left in %s.", lv->name);
- return lv_remove_with_dependencies(cmd, lv, 1, 0);
+ return lv_remove_with_dependencies(cmd, lv, DONT_PROMPT, 0);
}
/*
diff --git a/tools/toollib.c b/tools/toollib.c
index f49512e9..bb4a810f 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -1245,7 +1245,7 @@ int vgcreate_params_set_from_args(struct cmd_context *cmd,
vp_def->max_lv);
vp_new->max_pv = arg_uint_value(cmd, maxphysicalvolumes_ARG,
vp_def->max_pv);
- vp_new->alloc = arg_uint_value(cmd, alloc_ARG, vp_def->alloc);
+ vp_new->alloc = (alloc_policy_t) arg_uint_value(cmd, alloc_ARG, vp_def->alloc);
/* Units of 512-byte sectors */
vp_new->extent_size =
@@ -1389,7 +1389,7 @@ int pvcreate_params_validate(struct cmd_context *cmd,
}
pp->yes = arg_count(cmd, yes_ARG);
- pp->force = arg_count(cmd, force_ARG);
+ pp->force = (force_t) arg_count(cmd, force_ARG);
if (arg_int_value(cmd, labelsector_ARG, 0) >= LABEL_SCAN_SECTORS) {
log_error("labelsector must be less than %lu",