X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Faugeas.c;h=79d41a46bcdc2b38fd39525f6886cb197c6eb419;hp=f75a1d6fc1862df71b3d0a84d3b311d71621e605;hb=13a499406fe43ab3a6d4d13c660f6a8b368e638f;hpb=d5532e9ad29b28c2b323ad0abe4e0caa6e03f675 diff --git a/daemon/augeas.c b/daemon/augeas.c index f75a1d6..79d41a4 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);