From 0ed2af7fb1fe458c545d775a5a13d779f2e69361 Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 27 Sep 2011 12:37:07 +0000 Subject: better -m0 error message, but there's an internal logic error to fix instead --- tools/lvcreate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/lvcreate.c') diff --git a/tools/lvcreate.c b/tools/lvcreate.c index c9897e6f..89e0191c 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -575,11 +575,14 @@ static int _lvcreate_params(struct lvcreate_params *lp, /* * Check selected options are compatible and determine segtype */ +// FIXME -m0 implies *striped* if (arg_count(cmd, thin_ARG) && arg_count(cmd,mirrors_ARG)) { log_error("--thin and --mirrors are incompatible."); return 0; } +// FIXME -m0 implies *striped* + /* Set default segtype */ if (arg_count(cmd, mirrors_ARG)) segtype_str = find_config_tree_str(cmd, "global/mirror_segtype_default", DEFAULT_MIRROR_SEGTYPE); @@ -620,7 +623,7 @@ static int _lvcreate_params(struct lvcreate_params *lp, lp->mirrors = arg_uint_value(cmd, mirrors_ARG, 0) + 1; if (lp->mirrors == 1) { if (segtype_is_mirrored(lp->segtype)) { - log_error("Image count for segtype \"%s\" cannot be 0.", lp->segtype->name); + log_error("--mirrors must be at least 1 with segment type %s.", lp->segtype->name); return 0; } log_print("Redundant mirrors argument: default is 0"); -- cgit