[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 4/6] ts-xen-build-prep: Break out determine_vg_lv
And make $lv a global. Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- ts-xen-build-prep | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ts-xen-build-prep b/ts-xen-build-prep index 6443351..d600285 100755 --- a/ts-xen-build-prep +++ b/ts-xen-build-prep @@ -28,8 +28,9 @@ $whhost ||= 'host'; our $ho= selecthost($whhost); exit 0 if $ho->{SharedReady}; -our ($vg); +our ($vg,$lv); +our $lvleaf = 'root'; our $pe_size; our $extended_pes = 0; @@ -50,12 +51,15 @@ sub overall_limit_pe ($) { $extended_pes += $$pevar; } -sub lvextend_stage1 () { +sub determine_vg_lv () { $vg= $ho->{Suite} =~ m/lenny/ ? "$ho->{Name}.$c{TestHostDomain}" : $ho->{Name}; + $lv = "/dev/$vg/$lvleaf"; +} +sub lvextend_stage1 () { target_cmd_root($ho, <<END); set -ex; if ! test -f /root/swap_osstest_enabled; then lvcreate -L 10G -n swap_osstest_build $vg ||: @@ -82,8 +86,6 @@ sub vginfo () { sub lvextend1 ($$$) { my ($what, $max_more_gb) = @_; - my $lv= "/dev/$vg/root"; - my @vginfo = vginfo(); $pe_size= $vginfo[12]; @@ -199,6 +201,7 @@ sub ccache_setup () { } if (!$ho->{Flags}{'no-reinstall'}) { + determine_vg_lv(); lvextend_stage1(); prep(); ccache_setup(); -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |