search for: guestfs_tar_in

Displaying 14 results from an estimated 14 matches for "guestfs_tar_in".

2012 Jan 16
1
[PATCH] generator: Add an explicit Cancellable flag
...cratchFS, Always, TestOutput ( [["mkdir"; "/tgz_in"]; ["tgz_in"; "../data/helloworld.tar.gz"; "/tgz_in"]; @@ -2850,7 +2855,8 @@ I<gzip compressed> tar file) into C<directory>. To upload an uncompressed tarball, use C<guestfs_tar_in>."); - ("tgz_out", (RErr, [Pathname "directory"; FileOut "tarball"], []), 72, [], + ("tgz_out", (RErr, [Pathname "directory"; FileOut "tarball"], []), 72, + [Cancellable], [], "pack directory into compressed tarb...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2015 Feb 02
1
Re: [PATCH 5/6] New APIs: copy-in and copy-out
...tfs___cmd_add_arg (cmd, "-"); > + guestfs___cmd_add_arg (cmd, basename); > + > + r = guestfs___cmd_run_async (cmd, NULL, NULL, &fd, NULL); > + if (r == -1) > + return -1; > + > + snprintf (fdbuf, sizeof fdbuf, "/dev/fd/%d", fd); > + > + r = guestfs_tar_in (g, fdbuf, remotedir); > + > + if (close (fd) == -1) { > + perror ("close (tar subprocess)"); > + return -1; > + } > + > + r = guestfs___cmd_wait (cmd); > + if (r == -1) > + return -1; > + if (!(WIFEXITED (r) && WEXITSTATUS (r) == 0)) &g...
2012 Mar 08
2
mounting using guestfish
[Please remember to post all questions on the mailing list] On Thu, Mar 08, 2012 at 09:41:19PM +0700, Tho Huynh wrote: > Can I mount the guest's file system into a folder/path (mountpoint) > in the host machine using guestfish? No, but you don't need to. > And accessing that folder equal to accessing the guest's file > system. What I'm trying to do is to copy a file
2015 Jan 26
6
[PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
--- src/command.c | 64 +++++++++++++++++++++++++++++++++++++++++++------- src/guestfs-internal.h | 3 +++ 2 files changed, 58 insertions(+), 9 deletions(-) diff --git a/src/command.c b/src/command.c index 4bb469b..e26573d 100644 --- a/src/command.c +++ b/src/command.c @@ -360,7 +360,7 @@ debug_command (struct command *cmd) } static int -run_command (struct command *cmd)
2015 Jan 26
0
[PATCH 5/6] New APIs: copy-in and copy-out
...__cmd_add_arg (cmd, "-cf"); + guestfs___cmd_add_arg (cmd, "-"); + guestfs___cmd_add_arg (cmd, basename); + + r = guestfs___cmd_run_async (cmd, NULL, NULL, &fd, NULL); + if (r == -1) + return -1; + + snprintf (fdbuf, sizeof fdbuf, "/dev/fd/%d", fd); + + r = guestfs_tar_in (g, fdbuf, remotedir); + + if (close (fd) == -1) { + perror ("close (tar subprocess)"); + return -1; + } + + r = guestfs___cmd_wait (cmd); + if (r == -1) + return -1; + if (!(WIFEXITED (r) && WEXITSTATUS (r) == 0)) + return -1; + + return 0; +} + +struct copy_out...
2009 Aug 13
7
[PATCHx7] Misc patches
..."directory"]), 6, [], [InitBasicFS, Always, TestOutputList ( [["touch"; "/new"]; ["touch"; "/newer"]; @@ -1910,7 +1910,7 @@ I<gzip compressed> tar file) into C<directory>. To upload an uncompressed tarball, use C<guestfs_tar_in>."); - ("tgz_out", (RErr, [String "directory"; FileOut "tarball"]), 72, [], + ("tgz_out", (RErr, [Pathname "directory"; FileOut "tarball"]), 72, [], [], "pack directory into compressed tarball", "\ @@...
2012 Mar 09
1
[PATCH 1/2] Close all file descriptors in the recovery process.
From: "Richard W.M. Jones" <rjones at redhat.com> If the parent process uses a pipe (or any fd, but pipes are a particular problem), then the recovery process would hold open the file descriptor(s) of the pipe, meaning that it could not be fully closed in the parent. Because the recovery process doesn't use exec(2), this wasn't avoidable even using FD_CLOEXEC. Avoid this
2015 Feb 02
8
[PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize
Hi, attached there is the second version of the patch series adding copy_in and copy_out in the library, mostly moving them from guestfish. It also adds the copy_in usage in virt-customize, as aid in a new image building. Thanks, Pino Toscano (7): cmd: add a way to run (and wait) asynchronously commands cmd: add a child-setup callback cmd: add the possibility to get a fd to the process
2016 Jan 06
0
ANNOUNCE: libguestfs 1.32 released
...ot;sparse" (making it consistent with qcow2). For qcow2, this allows "sparse" as a synonym for "off". It also adds "full", which corresponds to fully allocated, but uses posix_fallocate(3) for efficiency. "guestfs_tar_in": new "xattrs", "selinux", "acl" parameters. "guestfs_tar_out": new "xattrs", "selinux", "acl" parameters. These extra parameters control whether extended attributes, SELinux contexts and/or POSI...
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2014 Jan 27
0
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
...x = %" PRIi64 "\n", stats->namemax); + } + + /* Prepare the input to be copied in. */ + if (prepare_input (input, ifmt, &ifile, &ifile_delete_on_exit) == -1) + return -1; + + if (verbose) + fprintf (stderr, "uploading from %s to / ...\n", ifile); + r = guestfs_tar_in (g, ifile, "/"); + if (ifile_delete_on_exit) + unlink (ifile); + if (r == -1) + return -1; + + if (verbose) { + CLEANUP_FREE_STATVFS struct guestfs_statvfs *stats = + guestfs_statvfs (g, "/"); + fprintf (stderr, "after uploading:\n"); + fprintf (...
2014 Jan 27
2
[PATCH INCOMPLETE] Rewrite virt-make-fs in C (originally Perl).
I thought it would be easy to rewrite virt-make-fs in C. Two days later ... The Perl program uses a lot of external commands, which makes it pretty tedious to implement in C. Rich.
2015 Jun 14
2
[PATCH] pod: Use F<> for filenames instead of C<>.
...VG/Copy>) must be at least as large as the +source (F</dev/VG/Original>). To copy less than the whole source device, use the optional C<size> parameter: guestfs_copy_device_to_device (g, @@ -353,7 +353,7 @@ Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</guestfs_tar_out> etc appear to only take filenames as arguments, so it appears you can only upload and download to files. However many Un*x-like hosts let you use the special device -files C</dev/stdin>, C</dev/stdout>, C</dev/stderr> and C</dev/fd/N> +files...