diff mbox series

[OSSTEST,1/4] TestSupport: Break out target_getfile_something_stash

Message ID 20190924144244.7940-1-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series [OSSTEST,1/4] TestSupport: Break out target_getfile_something_stash | expand

Commit Message

Ian Jackson Sept. 24, 2019, 2:42 p.m. UTC
No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 Osstest/TestSupport.pm | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index e554af38..896e275e 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -565,13 +565,17 @@  sub target_getfile_root ($$$$) {
     my ($ho,$timeout, $rsrc,$ldst) = @_;
     tgetfileex('root', @_);
 }
-sub target_getfile_root_stash ($$$;$) {
-    my ($ho,$timeout,$rsrc, $lleaf) = @_; # => full path of local file
+sub target_getfile_something_stash ($$$$;$) {
+    my ($tgf,$ho,$timeout,$rsrc, $lleaf) = @_; # => full path of local file
     target_somefile_leaf(\$lleaf, $rsrc, $ho);
     open_unique_stashfile(\$lleaf); # discard filehandle, leave file
     my $lfile = "$stash/$lleaf";
-    target_getfile_root($ho,$timeout,$rsrc,$lfile);
+    $tgf->($ho,$timeout,$rsrc,$lfile);
     return $lfile;
+}    
+sub target_getfile_root_stash ($$$;$) {
+    my ($ho,$timeout,$rsrc, $lleaf) = @_; # => full path of local file
+    &target_getfile_something_stash(\&target_getfile_root, @_);
 }
 
 sub tputfileex {