From: Dario Faggioli <raist...@linux.it> As an analogue to target_putfilecontents_[root_]stash().
(While at it, fix one whitespace damaged line.) Signed-off-by: Dario Faggioli <dario.faggi...@citrix.com> Cc: Wei Liu <wei.l...@citrix.com> Cc: Ian Campbell <ian.campb...@citrix.com> Cc: Ian Jackson <ian.jack...@eu.citrix.com> --- Changes from RFCv1: * adding this was requested during review. --- Osstest/TestSupport.pm | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index cdff8d5..67befd0 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -53,7 +53,8 @@ BEGIN { target_getfile target_getfile_root target_putfile target_putfile_root target_putfilecontents_stash - target_putfilecontents_root_stash + target_putfilecontents_root_stash + target_getfile_stash target_getfile_root_stash target_put_guest_image target_editfile target_editfile_root target_file_exists target_run_apt @@ -473,6 +474,20 @@ sub target_putfilecontents_root_stash ($$$$;$) { tpfcs_core(\&target_putfile_root, @_); } +sub tgfs_core { + my ($tgetfilef,$ho,$timeout,$rsrc,$lleaf) = @_; + target_somefile_getleaf(\$lleaf,$rsrc,$ho); + $tgetfilef->($ho, $timeout, $rsrc, "$stash/$lleaf"); +} +sub target_getfile_stash ($$$;$) { + my ($ho,$timeout,$rsrc,$lleaf) = @_; + tgfs_core(\&target_getfile, @_); +} +sub target_getfile_root_stash ($$$;$) { + my ($ho,$timeout,$rsrc,$lleaf) = @_; + tgfs_core(\&target_getfile_root, @_); +} + sub target_file_exists ($$) { my ($ho,$rfile) = @_; my $out= target_cmd_output($ho, "if test -e $rfile; then echo y; fi"); _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel