summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-08-14 09:04:51 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-08-14 09:53:37 +0100
commit864ef706a84c7c87a62f776d4b2e82a6f959ae14 (patch)
tree12902960fade1810e74a72aa6882c9ee28249e8f /tools
parent84c897c93a794e4bdab37dfd505618de68bf145d (diff)
downloadlibguestfs-864ef706a84c7c87a62f776d4b2e82a6f959ae14.tar.gz
libguestfs-864ef706a84c7c87a62f776d4b2e82a6f959ae14.tar.xz
libguestfs-864ef706a84c7c87a62f776d4b2e82a6f959ae14.zip
Add optional compress flag to tar-in, tar-out APIs.
The compress flag can be used to control compression, one of: (none), "compress", "gzip", "bzip2", "xz", "lzop". Thus these calls can now be used instead of tgz-in/tgz-out/txz-in/txz-out, and also support more compression types. Mark these APIs as once_had_no_optargs so that compatibility code is generated.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/virt-tar4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/virt-tar b/tools/virt-tar
index 801104fe..053231c1 100755
--- a/tools/virt-tar
+++ b/tools/virt-tar
@@ -267,13 +267,13 @@ foreach (@fses) {
# Do the tar command.
if ($mode eq "x") {
if ($gzip) {
- $g->tgz_out ($directory, $tarball);
+ $g->tar_out ($directory, $tarball, compress => "gzip");
} else {
$g->tar_out ($directory, $tarball);
}
} else { # mode eq "u"
if ($gzip) {
- $g->tgz_in ($tarball, $directory);
+ $g->tar_in ($tarball, $directory, compress => "gzip");
} else {
$g->tar_in ($tarball, $directory);
}