search for: copy_out_child_data

Displaying 8 results from an estimated 8 matches for "copy_out_child_data".

2015 Feb 02
1
Re: [PATCH 5/6] New APIs: copy-in and copy-out
...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_child_data { > + const char *localdir; > + const char *basename; > +}; > + > +static int > +child_setup (guestfs_h *g, void *data) > +{ > + struct copy_out_child_data d = *(struct copy_out_child_data *) data; > + > + if (chdir (d.localdir) == -1) { > + perror (d.localdi...
2015 Jan 26
0
[PATCH 5/6] New APIs: copy-in and copy-out
...s_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_child_data { + const char *localdir; + const char *basename; +}; + +static int +child_setup (guestfs_h *g, void *data) +{ + struct copy_out_child_data d = *(struct copy_out_child_data *) data; + + if (chdir (d.localdir) == -1) { + perror (d.localdir); + return -1; + } + + if (mkdir (d.basename, 07...
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)
2017 Feb 15
1
[PATCH v2] copy-out: new optional arguments
...estfs_impl_copy_out_opts (guestfs_h *g, + const char *remotepath, const char *localdir, + const struct guestfs_copy_out_opts_argv *optargs) { struct stat statbuf; int r; @@ -170,6 +171,7 @@ guestfs_impl_copy_out (guestfs_h *g, struct copy_out_child_data data; char fdbuf[64]; int fd; + struct guestfs_tar_out_opts_argv tar_optargs = { .bitmask = 0 }; r = guestfs_is_dir (g, remotepath); if (r == -1) @@ -210,7 +212,28 @@ guestfs_impl_copy_out (guestfs_h *g, snprintf (fdbuf, sizeof fdbuf, "/dev/fd/%d", fd); -...
2017 Feb 14
0
[PATCH 06/10] copy-out: new 'excludes' optional argument
...estfs_impl_copy_out_opts (guestfs_h *g, + const char *remotepath, const char *localdir, + const struct guestfs_copy_out_opts_argv *optargs) { struct stat statbuf; int r; @@ -170,6 +171,7 @@ guestfs_impl_copy_out (guestfs_h *g, struct copy_out_child_data data; char fdbuf[64]; int fd; + struct guestfs_tar_out_opts_argv tar_optargs = { .bitmask = 0 }; r = guestfs_is_dir (g, remotepath); if (r == -1) @@ -210,7 +212,12 @@ guestfs_impl_copy_out (guestfs_h *g, snprintf (fdbuf, sizeof fdbuf, "/dev/fd/%d", fd); -...
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
2017 Feb 14
14
[PATCH 00/10] dib/API: improvements and fixes
Hi, this patch series does changes mostly in virt-dib, few bug fixes and a couple of new features (mostly implemented upstream already). In addition, one new API is added, and a new optional argument for an existing API is added (the latter is not needed, but could be useful anyway). Thanks, Pino Toscano (10): dib: fix listing envvars in fake-sudo dib: source dib "die" script in
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.