search for: guestfs_impl_get_cachedir

Displaying 9 results from an estimated 9 matches for "guestfs_impl_get_cachedir".

2016 Feb 02
0
[PATCH 2/3] lib: extract lazy tmpdir creation helper
...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 = getdir (g); + char *tmppath = safe_asprintf (g, "%s/libguestfsXXXXXX", tmpdir); + if (mk...
2016 May 12
0
[PATCH 2/4] src/tmpdirs.c: Add internal documentation.
...turn set_abs_path (g, cachedir, &g->int_cachedir); } -/* Note this actually calculates the cachedir, so it never returns NULL. */ +/** + * Implements the C<guestfs_get_cachedir> API. + * + * Note this actually calculates the cachedir, so it never returns C<NULL>. + */ char * guestfs_impl_get_cachedir (guestfs_h *g) { @@ -126,7 +140,12 @@ guestfs_impl_get_cachedir (guestfs_h *g) return safe_strdup (g, str); } -/* Note this actually calculates the sockdir, so it never returns NULL. */ +/** + * Implements the C<guestfs_get_sockdir> API. + * + * Note this actually calculates the sockdi...
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 Feb 02
0
[PATCH 3/3] New API: get-sockdir
...int +guestfs_int_set_env_runtimedir (guestfs_h *g, const char *runtimedir) +{ + return set_abs_path (g, runtimedir, &g->env_runtimedir); +} + +int guestfs_impl_set_tmpdir (guestfs_h *g, const char *tmpdir) { return set_abs_path (g, tmpdir, &g->int_tmpdir); @@ -119,6 +125,20 @@ guestfs_impl_get_cachedir (guestfs_h *g) return safe_strdup (g, str); } +/* Note this actually calculates the sockdir, so it never returns NULL. */ +char * +guestfs_impl_get_sockdir (guestfs_h *g) +{ + const char *str; + + if (g->env_runtimedir) + str = g->env_runtimedir; + else + str = "/tmp"...
2016 Feb 03
0
[PATCH v2 2/2] New API: get-sockdir
...int +guestfs_int_set_env_runtimedir (guestfs_h *g, const char *runtimedir) +{ + return set_abs_path (g, runtimedir, &g->env_runtimedir); +} + +int guestfs_impl_set_tmpdir (guestfs_h *g, const char *tmpdir) { return set_abs_path (g, tmpdir, &g->int_tmpdir); @@ -119,6 +125,20 @@ guestfs_impl_get_cachedir (guestfs_h *g) return safe_strdup (g, str); } +/* Note this actually calculates the sockdir, so it never returns NULL. */ +char * +guestfs_impl_get_sockdir (guestfs_h *g) +{ + const char *str; + + if (g->env_runtimedir) + str = g->env_runtimedir; + else + str = "/tmp"...
2016 Feb 03
4
[PATCH v2 1/2] 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. Futhermore, check that the length of sockets won't overflow the buffer for their filenames. --- src/guestfs-internal.h | 1 + src/launch-direct.c | 4 +++- src/launch-libvirt.c | 10 ++++++---- src/launch.c | 17 +++++++++++++++++ 4 files changed, 27
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
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 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.