master - allocation: add default path
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e7d189baf741d8f27c66cb53ea15f78dcc29efec Commit: e7d189baf741d8f27c66cb53ea15f78dcc29efec Parent: 3e49753e6cf9886472c3e7cd11da456f1bd856d1 Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Feb 25 09:36:26 2014 +0100 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Feb 25 09:36:26 2014 +0100
allocation: add default path
Make it obvious for compiler extents is always defined for valid code path.
--- lib/metadata/lv_manip.c | 3 +++ tools/lvcreate.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletions(-)
lib/metadata/lv_manip.c +3 -0
@@ -3858,6 +3858,9 @@ static int _lvresize_adjust_extents(struct cmd_context *cmd, struct logical_volucase PERCENT_NONE : extents = lp->extents;break ; +default : +log_error (INTERNAL_ERROR "Unsupported percent type %u." , lp->percent); +return 0 ; }if (lp->percent !=PERCENT_NONE ) {
tools/lvcreate.c +4 -1
@@ -363,7 +363,7 @@ static int _update_extents_params(struct volume_group *vg, }else lp->pvh = &vg->pvs; -switch (lcp->percent) { +switch (lcp->percent) {case PERCENT_VG : extents =percent_of_extents (lp->extents, vg->extent_count,0 );break ;
@@ -397,6 +397,9 @@ static int _update_extents_params(struct volume_group *vg,case PERCENT_NONE : extents = lp->extents;break ; +default : +log_error (INTERNAL_ERROR "Unsupported percent type %u." , lcp->percent); +return 0 ; }if (lcp->percent) {