]> xenbits.xensource.com Git - osstest.git/commitdiff
Osstest/TestSupport: Hide $ho->{Toolstack} from casual use
authorIan Campbell <ian.campbell@citrix.com>
Fri, 31 Jul 2015 10:58:48 +0000 (11:58 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 9 Sep 2015 16:07:56 +0000 (17:07 +0100)
This should only be accessed via toolstack($ho), which is responsible
for caching the value. Rename the field to _Toolstack to deter code
from using it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm

index ceb4d0fe647104922f9f694eaf9ac6c678aefe12..0afaeab73cf7ba174e02a37cf1895fca33696145 100644 (file)
@@ -2078,11 +2078,11 @@ sub guest_vncsnapshot_stash ($$$$) {
 
 sub toolstack ($) {
     my ($ho) = @_;
-    return $ho->{Toolstack} if $ho->{Toolstack};
+    return $ho->{_Toolstack} if $ho->{_Toolstack};
 
     my $tsname= $r{toolstack} || 'xend';
-    $ho->{Toolstack}= get_host_method_object($ho, 'Toolstack', $tsname);
-    return $ho->{Toolstack};
+    $ho->{_Toolstack}= get_host_method_object($ho, 'Toolstack', $tsname);
+    return $ho->{_Toolstack};
 }
 
 sub authorized_keys () {