1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-03 17:50:03 +03:00

lvconvert: Improve message for raid without -m.

This commit is contained in:
Alasdair G Kergon 2015-11-30 22:36:05 +00:00
parent eb22f7c8f7
commit 46c8d6bb8a
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.137 -
=====================================
Avoid misleading error with -m is omitted with lvconvert to raid types.
Version 2.02.136 - 28th November 2015
=====================================

View File

@ -242,9 +242,9 @@ static int _check_conversion_type(struct cmd_context *cmd, const char *type_str)
if (!type_str || !*type_str)
return 1;
if (!strcmp(type_str, "mirror")) {
if (!strcmp(type_str, "mirror") || !strncmp(type_str, "raid", 4)) {
if (!arg_count(cmd, mirrors_ARG)) {
log_error("--type mirror requires -m/--mirrors");
log_error("Mirror and raid conversions require -m/--mirrors");
return 0;
}
return 1;