diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-18 10:43:52 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-18 10:43:52 +0100 |
commit | 78029b529ad98769685d607230b70f71832d5906 (patch) | |
tree | f103cb7252ccca7efc3e39f4400f961d5972937c /daemon/augeas.c | |
parent | e8c954933b2bfb3bc3ead5a151d49d164f1a8eab (diff) | |
download | libguestfs-78029b529ad98769685d607230b70f71832d5906.tar.gz libguestfs-78029b529ad98769685d607230b70f71832d5906.tar.xz libguestfs-78029b529ad98769685d607230b70f71832d5906.zip |
Make /sysroot path configurable.
Currently /sysroot is hard-coded throughout the daemon code.
This patch turns the path into a variable so that we can change
it in future, for example to allow standalone mode to be implemented.
This patch was tested by running all the C API tests successfully.
Diffstat (limited to 'daemon/augeas.c')
-rw-r--r-- | daemon/augeas.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/daemon/augeas.c b/daemon/augeas.c index f75a1d6f..79d41a46 100644 --- a/daemon/augeas.c +++ b/daemon/augeas.c @@ -53,7 +53,6 @@ do_aug_init (char *root, int flags) { #ifdef HAVE_AUGEAS char *buf; - int len; NEED_ROOT (-1); ABS_PATH (root, -1); @@ -63,13 +62,11 @@ do_aug_init (char *root, int flags) aug = NULL; } - len = strlen (root) + 9; - buf = malloc (len); + buf = sysroot_path (root); if (!buf) { reply_with_perror ("malloc"); return -1; } - snprintf (buf, len, "/sysroot%s", root); aug = aug_init (buf, NULL, flags); free (buf); |