mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
daemon: grub: Remove incorrect use of printf specifier %R
This code is attempting to construct a grub-install command like: grub-install --root-directory=/sysroot/boot /dev/sda In fact it was adding quoting to the --root-directory parameter where it was not needed (because our "command" function uses exec). Remove use of %R here (to avoid the extra quoting) and just use the sysroot prefix directly.
This commit is contained in:
@@ -38,7 +38,7 @@ do_grub_install (const char *root, const char *device)
|
||||
int r;
|
||||
CLEANUP_FREE char *err = NULL, *buf = NULL, *out = NULL;
|
||||
|
||||
if (asprintf_nowarn (&buf, "--root-directory=%R", root) == -1) {
|
||||
if (asprintf (&buf, "--root-directory=%s%s", sysroot, root) == -1) {
|
||||
reply_with_perror ("asprintf");
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user