master - lvconvert: Improve message for raid without -m.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=46c8d6bb8ae91ee67c8633496cc6c3d92bb4f3ce Commit: 46c8d6bb8ae91ee67c8633496cc6c3d92bb4f3ce Parent: eb22f7c8f7351a38fc4447f56ff588f497037c23 Author: Alasdair G Kergon <[email protected]> AuthorDate: Mon Nov 30 22:36:05 2015 +0000 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Mon Nov 30 22:36:05 2015 +0000
lvconvert: Improve message for raid without -m.
--- WHATS_NEW | 1 + tools/lvconvert.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
WHATS_NEW +1 -0
@@ -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 =====================================
tools/lvconvert.c +2 -2
@@ -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 ;