X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=daemon%2Fgrub.c;h=f394eefe7483301a704e932fd859637adec32522;hp=118771fa0001d069f21113b59475fd5fba53e5e6;hb=ac37f65aaf1f162a2cc57fa8c296a1ff4109adb9;hpb=1997858e90da728287ef26a6d01a5766ac914312 diff --git a/daemon/grub.c b/daemon/grub.c index 118771f..f394eef 100644 --- a/daemon/grub.c +++ b/daemon/grub.c @@ -26,26 +26,22 @@ #include "actions.h" int -do_grub_install (char *root, char *device) +do_grub_install (const char *root, const char *device) { int r; char *err; char *buf; - NEED_ROOT (-1); - ABS_PATH (root, -1); - RESOLVE_DEVICE (device, return -1); - if (asprintf_nowarn (&buf, "--root-directory=%R", root) == -1) { reply_with_perror ("asprintf"); return -1; } - r = command (NULL, &err, "/sbin/grub-install", buf, device, NULL); + r = command (NULL, &err, "grub-install", buf, device, NULL); free (buf); if (r == -1) { - reply_with_error ("grub-install: %s", err); + reply_with_error ("%s", err); free (err); return -1; }