search for: set_abs_path

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

2016 Oct 31
1
[PATCH] handle: Improve error messaging if XDG_RUNTIME_DIR path does not exist.
...r read * the environment variable (L<https://bugzilla.redhat.com/882417>). + * + * The C<ctxstr> parameter is a string displayed in error messages + * giving the context of the operation (eg. name of environment + * variable being used, or API function being called). */ static int -set_abs_path (guestfs_h *g, const char *tmpdir, char **tmpdir_ret) +set_abs_path (guestfs_h *g, const char *ctxstr, + const char *tmpdir, char **tmpdir_ret) { char *ret; struct stat statbuf; @@ -57,17 +62,20 @@ set_abs_path (guestfs_h *g, const char *tmpdir, char **tmpdir_ret) ret = rea...
2016 May 12
0
[PATCH 2/4] src/tmpdirs.c: Add internal documentation.
...ts of places in +/** + * We need to make all tmpdir paths absolute because lots of places in * the code assume this. Do it at the time we set the path or read - * the environment variable (RHBZ#882417). + * the environment variable (L<https://bugzilla.redhat.com/882417>). */ static int set_abs_path (guestfs_h *g, const char *tmpdir, char **tmpdir_ret) @@ -88,7 +93,12 @@ guestfs_impl_set_tmpdir (guestfs_h *g, const char *tmpdir) return set_abs_path (g, tmpdir, &g->int_tmpdir); } -/* Note this actually calculates the tmpdir, so it never returns NULL. */ +/** + * Implements the C&lt...
2016 Feb 02
0
[PATCH 3/3] New API: get-sockdir
...return 0; diff --git a/src/tmpdirs.c b/src/tmpdirs.c index 2ae9c74..e66ab9c 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -76,6 +76,12 @@ guestfs_int_set_env_tmpdir (guestfs_h *g, const char *tmpdir) } 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 c...
2016 Feb 03
0
[PATCH v2 2/2] New API: get-sockdir
...eturn 0; } diff --git a/src/tmpdirs.c b/src/tmpdirs.c index 2ae9c74..e66ab9c 100644 --- a/src/tmpdirs.c +++ b/src/tmpdirs.c @@ -76,6 +76,12 @@ guestfs_int_set_env_tmpdir (guestfs_h *g, const char *tmpdir) } 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 c...
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 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 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 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.
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...+ "protocol ‘%s’ does not support discard"), guestfs_int_drive_protocol_to_string (drv->src.protocol)); } diff --git a/lib/tmpdirs.c b/lib/tmpdirs.c index 7d289a650..344475d1b 100644 --- a/lib/tmpdirs.c +++ b/lib/tmpdirs.c @@ -74,7 +74,7 @@ set_abs_path (guestfs_h *g, const char *ctxstr, } if (!S_ISDIR (statbuf.st_mode)) { - error (g, _("%s: %s: '%s' is not a directory"), + error (g, _("%s: %s: ‘%s’ is not a directory"), _("setting temporary directory"), ctxstr, tmpdir); return -...