master - snapshot: report proper error message
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cd6d6fc24e8093d437543613ddbcbdb0e9c5f8c8 Commit: cd6d6fc24e8093d437543613ddbcbdb0e9c5f8c8 Parent: 15e7066fe3ea7ca9129b68e3b39e9667348a02cc Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Jun 17 13:13:23 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Jun 17 13:36:33 2014 +0200
snapshot: report proper error message
Expresing -lXX%LV is not valid for snapshot, but error message for snapshost case was not complete and missed %ORIGIN. Also document correct settings for in manpage properly where it missed %PVS.
--- man/lvcreate.8.in | 2 +- tools/lvcreate.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
man/lvcreate.8.in +1 -1
@@ -90,7 +90,7 @@ lvcreate \- create a logical volume in an existing volume group .B lvcreate .RB [ \-l | \-\-extents -.IR LogicalExtentsNumber [ % { VG | FREE | ORIGIN }] +.IR LogicalExtentsNumber [ % { ORIGIN | VG | PVS | FREE }] | .BR \-L | \-\-size .IR LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]]
tools/lvcreate.c +2 -2
@@ -380,8 +380,8 @@ static int _update_extents_params(struct volume_group *vg, extents =percent_of_extents (lp->extents, vg->extent_count,0 );break ;case PERCENT_LV : -log_error ("Please express size as %%VG, %%PVS, or " -"%%FREE." ); +log_error ("Please express size as %s%%VG, %%PVS, " +"or %%FREE." , (lp->snapshot) ?"%ORIGIN, " :"" );return 0 ;case PERCENT_ORIGIN : if (lp->snapshot && lp->origin &&