search for: split_path

Displaying 10 results from an estimated 10 matches for "split_path".

2015 Feb 02
1
Re: [PATCH 5/6] New APIs: copy-in and copy-out
...> +#include <sys/stat.h> > +#include <sys/wait.h> > +#include <errno.h> > +#include <string.h> > + > +#include "guestfs.h" > +#include "guestfs-internal.h" > +#include "guestfs-internal-actions.h" > + > +static int split_path (char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename); > + > +int > +guestfs__copy_in (guestfs_h *g, const char *localpath, const char *remotedir) > +{ > + CLEANUP_CMD_CLOSE struct command *cmd = guestfs___new_command (g); > + int fd; > +...
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
...ude <unistd.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <sys/wait.h> +#include <errno.h> +#include <string.h> + +#include "guestfs.h" +#include "guestfs-internal.h" +#include "guestfs-internal-actions.h" + +static int split_path (char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename); + +int +guestfs__copy_in (guestfs_h *g, const char *localpath, const char *remotedir) +{ + CLEANUP_CMD_CLOSE struct command *cmd = guestfs___new_command (g); + int fd; + int r; + char fdbuf[64]; + size...
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
2015 Sep 29
2
[PATCH 1/2] copy-in: print tar stderr when it fails
...++++++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/src/copy-in-out.c b/src/copy-in-out.c index dc9e7b7..0dd8cd3 100644 --- a/src/copy-in-out.c +++ b/src/copy-in-out.c @@ -34,17 +34,19 @@ #include "guestfs-internal-actions.h" static int split_path (guestfs_h *g, char *buf, size_t buf_size, const char *path, const char **dirname, const char **basename); +static int drain_fd (guestfs_h *g, int fd, char **ret); int guestfs_impl_copy_in (guestfs_h *g, const char *localpath, const char *remotedir) { CLEANUP_CMD_CLOSE struct command *cmd =...
2015 Sep 29
8
[PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
Commits 3c27f3d91e1566854747bbe844186783fc84f3a8 and 1b6f0daa9ae7fcc94e389232d0c397816cda973d added an internal API for running commands asynchronously. It is only used by the copy-in and copy-out APIs. Unfortunately this made the command code very complex: it was almost impossible to redirect stderr to a file, and there were a lot of long-range dependencies through the file. It was also buggy:
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames. Rich.
2016 Mar 07
2
[PATCH v2] Use less stack.
...7 +153,7 @@ guestfs_impl_copy_out (guestfs_h *g, if (r == 1) { /* is file */ CLEANUP_FREE char *filename = NULL; size_t buf_len = strlen (remotepath) + 1; - char buf[buf_len]; + CLEANUP_FREE char *buf = safe_malloc (g, buf_len); const char *basename; if (split_path (g, buf, buf_len, remotepath, NULL, &basename) == -1) @@ -181,7 +181,7 @@ guestfs_impl_copy_out (guestfs_h *g, } size_t buf_len = strlen (remotepath) + 1; - char buf[buf_len]; + CLEANUP_FREE char *buf = safe_malloc (g, buf_len); const char *basename; if (split_path (...
2009 Nov 04
22
Any ideas about this error with upgrading to 0.25.1?
Hi I''m getting this error with a 0.25.1 puppetmaster and 0.25.1 node. Nov 4 14:43:35 devcentos5 puppetd[26099]: (//network-config::base/File [hosts]) Failed to retrieve current state of resource: Error 400 on SERVER: Not authorized to call find on /file_metadata/network-config/ hosts/hosts.devcentos5 Could not retrieve file metadata for puppet:///network-config/hosts/hosts.devcentos5:
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.