xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST] Osstest/TestSupport: Hide $ho->{Toolstack} from casual use
Date: Fri, 31 Jul 2015 11:58:48 +0100	[thread overview]
Message-ID: <1438340328-30530-1-git-send-email-ian.campbell@citrix.com> (raw)

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>
---
 Osstest/TestSupport.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 84e86fd..0370129 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -2076,11 +2076,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 () {
-- 
2.1.4

             reply	other threads:[~2015-07-31 10:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 10:58 Ian Campbell [this message]
2015-09-09 15:52 ` [PATCH OSSTEST] Osstest/TestSupport: Hide $ho->{Toolstack} from casual use Ian Jackson
2015-09-09 16:13   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438340328-30530-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).