]> xenbits.xensource.com Git - people/royger/osstest.git/commitdiff
TestSupport: Break out target_getfile_something_stash
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Sep 2019 12:23:51 +0000 (13:23 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Tue, 24 Sep 2019 12:24:54 +0000 (13:24 +0100)
No functional change.

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

index e554af38127c8c22ed3e7d8043d4863a8256e5fc..896e275e8bdb101bc46e7e077a84c12c5715d854 100644 (file)
@@ -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 {