Generate a dummy 'Fedora' fedora.img in images directory for use by tests.
[libguestfs.git] / daemon / grub.c
index 0a49c45..f394eef 100644 (file)
 #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, 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;
   }