search for: 9154d8b

Displaying 7 results from an estimated 7 matches for "9154d8b".

2016 Feb 02
0
[PATCH 2/3] lib: extract lazy tmpdir creation helper
...for lazy creation of a temporary directory, so it can be used for more directories as well. This is just code motion, with no behaviour changes. --- src/tmpdirs.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/tmpdirs.c b/src/tmpdirs.c index 9154d8b..2ae9c74 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -119,6 +119,22 @@ guestfs_impl_get_cachedir (guestfs_h *g) return safe_strdup (g, str); } +static int +lazy_make_tmpdir (guestfs_h *g, char *(*getdir) (guestfs_h *g), char **dest) +{ + if (!*dest) { + CLEANUP_FREE char *tmpdir = g...
2016 Jan 29
0
[PATCH 6/6] launch: avoid too long paths for sockets
...;\0'; + + return 0; +} + /* glibc documents, but does not actually implement, a 'getumask(3)' * call. This implements a thread-safe way to get the umask. Note * this is only called when g->verbose is true and after g->tmpdir diff --git a/src/tmpdirs.c b/src/tmpdirs.c index 9154d8b..e406e53 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -139,6 +139,21 @@ guestfs_int_lazy_make_tmpdir (guestfs_h *g) return 0; } +int +guestfs_int_lazy_make_sockdir (guestfs_h *g) +{ + if (!g->sockdir) { + g->sockdir = safe_strdup (g, "/tmp/guestfs-sockXXXXXX"); + i...
2016 Jan 29
7
[PATCH 1/6] launch: unix: check for length of sockets
Error out early if the path to the socket will not fit into sockaddr_un::sun_path, as we will not be able to connect to it. --- src/launch-unix.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/launch-unix.c b/src/launch-unix.c index 740c554..973e14b 100644 --- a/src/launch-unix.c +++ b/src/launch-unix.c @@ -47,6 +47,12 @@ launch_unix (guestfs_h *g, void *datav, const char
2016 Feb 02
6
[PATCH 1/3] launch: add internal helper for socket paths creation
Introduce an internal helper to create paths for sockets; will be useful for changing later the logic for placing sockets. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 15 +++++++++++++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index
2016 Jan 29
1
Re: [PATCH 6/6] launch: avoid too long paths for sockets
...t; + > /* glibc documents, but does not actually implement, a 'getumask(3)' > * call. This implements a thread-safe way to get the umask. Note > * this is only called when g->verbose is true and after g->tmpdir > diff --git a/src/tmpdirs.c b/src/tmpdirs.c > index 9154d8b..e406e53 100644 > --- a/src/tmpdirs.c > +++ b/src/tmpdirs.c > @@ -139,6 +139,21 @@ guestfs_int_lazy_make_tmpdir (guestfs_h *g) > return 0; > } > > +int > +guestfs_int_lazy_make_sockdir (guestfs_h *g) > +{ > + if (!g->sockdir) { > + g->sockdir = safe_...
2015 Sep 29
0
[PATCH 4/4] lib: Remove unused header files.
...a/src/stringsbuf.c +++ b/src/stringsbuf.c @@ -23,7 +23,6 @@ #include <stdio.h> #include <stdlib.h> #include <stdarg.h> -#include <string.h> #include "guestfs.h" #include "guestfs-internal.h" diff --git a/src/tmpdirs.c b/src/tmpdirs.c index c2799c8..9154d8b 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -20,9 +20,6 @@ #include <stdio.h> #include <stdlib.h> -#include <string.h> -#include <unistd.h> -#include <limits.h> #include <sys/types.h> #include <sys/stat.h> #include <libintl.h> -- 2.5.0
2015 Sep 29
8
[PATCH 1/4] lib: actions: Remove some unused header files.
--- generator/c.ml | 2 -- 1 file changed, 2 deletions(-) diff --git a/generator/c.ml b/generator/c.ml index 055b683..963cf21 100644 --- a/generator/c.ml +++ b/generator/c.ml @@ -1213,9 +1213,7 @@ and generate_client_actions hash () = #include <stdlib.h> #include <stdint.h> #include <inttypes.h> -#include <sys/types.h> #include <sys/stat.h> -#include