[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/6] TestSupport: break out lv_dev_mapper



On Wed, 2014-06-11 at 21:47 +0100, Ian Jackson wrote:
> Signed-off-by: Ian Jackson <ijackson@xxxxxxxxxxxxxxxxxxxxxx>
> ---
>  Osstest/TestSupport.pm |   17 +++++++++++------
>  1 file changed, 11 insertions(+), 6 deletions(-)
> 
> diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
> index 93c8fcf..593f06c 100644
> --- a/Osstest/TestSupport.pm
> +++ b/Osstest/TestSupport.pm
> @@ -59,7 +59,8 @@ BEGIN {
>                        target_run_apt
>                        target_install_packages target_install_packages_norec
>                        target_jobdir target_extract_jobdistpath_subdir
> -                      target_extract_jobdistpath target_guest_lv_name
> +                      target_extract_jobdistpath
> +                      lv_dev_mapper target_guest_lv_name
>  
>                        poll_loop tcpconnect await_tcp
>                        contents_make_cpio file_simple_write_contents
> @@ -639,13 +640,17 @@ sub poll_loop ($$$&) {
>      logm("$what: ok. (${waited}s)");
>  }
>  
> -sub target_guest_lv_name($$) {
> -    my ($ho, $lv) = @_;
> -
> -    my $vg = "$ho->{Name}";
> -    # Dashes are escaped in the VG name
> +sub lv_dev_mapper ($$) {
> +    my ($vg,$lv) = @_;
>      $vg =~ s/-/--/g;
> +    $lv =~ s/-/--/g;
> +    # Dashes are doubled in the VG and LV names

Doesn't this belong before the two substitutions?

>      return "/dev/mapper/$vg-$lv";
> +}    
> +
> +sub target_guest_lv_name($$) {
> +    my ($ho, $lv) = @_;
> +    return lv_dev_mapper("$ho->{Name}", $lv);
>  }
>  
>  #---------- dhcp watching ----------



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.