#include "../src/guestfs_protocol.h"
#include "daemon.h"
#include "actions.h"
+#include "optgroups.h"
+
+int
+optgroup_xz_available (void)
+{
+ int r = access ("/usr/bin/xz", X_OK);
+ return r == 0;
+}
/* Redirect errors from the tar command to the error file, then
* provide functions for reading it in. We overwrite the file each
with C<guestfs_zero> which just zeroes the first few blocks of
a device.");
- ("txz_in", (RErr, [FileIn "tarball"; Pathname "directory"]), 229, [],
+ ("txz_in", (RErr, [FileIn "tarball"; Pathname "directory"]), 229, [Optional "xz"],
[InitBasicFS, Always, TestOutput (
[["txz_in"; "../images/helloworld.tar.xz"; "/"];
["cat"; "/hello"]], "hello\n")],
This command uploads and unpacks local file C<tarball> (an
I<xz compressed> tar file) into C<directory>.");
- ("txz_out", (RErr, [Pathname "directory"; FileOut "tarball"]), 230, [],
+ ("txz_out", (RErr, [Pathname "directory"; FileOut "tarball"]), 230, [Optional "xz"],
[],
"pack directory into compressed tarball",
"\