[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 2/2] osstest: clean ts-freebsd-install script
Remove some unused variables from ts-freebsd-install script. Also make the third parameter of target_put_guest_image optional and fix both callers of this function. Signed-off-by: Roger Pau Monnà <roger.pau@xxxxxxxxxx> Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 4 ++-- ts-freebsd-install | 21 ++------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 8754e22..96942bd 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1554,7 +1554,7 @@ END return $cfgpath; } -sub target_put_guest_image ($$$) { +sub target_put_guest_image ($$;$) { my ($ho, $gho, $default) = @_; my $specimage = $r{"$gho->{Guest}_image"}; $specimage = $default if !defined $specimage; @@ -1574,7 +1574,7 @@ sub more_prepareguest_hvm ($$$$;@) { my @disks = "phy:$gho->{Lvdev},hda,w"; if (!$xopts{NoCdromImage}) { - target_put_guest_image($ho, $gho, undef); + target_put_guest_image($ho, $gho); my $postimage_hook= $xopts{PostImageHook}; $postimage_hook->() if $postimage_hook; diff --git a/ts-freebsd-install b/ts-freebsd-install index 61d2f83..4449fd1 100755 --- a/ts-freebsd-install +++ b/ts-freebsd-install @@ -36,18 +36,6 @@ our $gho; our $mnt= '/root/freebsd_root'; -our $freebsd_version= "10.0-BETA3"; - -# Folder where the FreeBSD VM images are stored inside of the host -# -# The naming convention of the stored images is: -# FreeBSD-$freebsd_version-$arch.qcow2.xz -# ie: FreeBSD-10.0-BETA3-amd64.qcow2.xz -# -# Used only if the runvar <guest>_image is not set. -# -our $freebsd_vm_repo= '/var/images'; - sub prep () { my $authkeys= authorized_keys(); @@ -59,13 +47,8 @@ sub prep () { more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1); - target_put_guest_image($ho, $gho, - "$freebsd_vm_repo/FreeBSD-$freebsd_version-". - (defined($r{"$gho->{Guest}_arch"}) - # Use amd64 as default arch - ? $r{"$gho->{Guest}_arch"} : 'amd64'). - ".qcow2.xz"); - + target_put_guest_image($ho, $gho); + my $rootpartition_dev = target_guest_lv_name($ho, $gho->{Name}) . "--disk3"; target_cmd_root($ho, "umount $gho->{Lvdev} ||:"); -- 1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |