+2013-11-14 Matthew Garrett <mjg@redhat.com>
+
+ * grub-core/kern/main.c (grub_set_prefix_and_root): Set variable
+ cmdpath to firmware directory.
+
2013-11-14 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/efi/efi.c (grub_efi_get_filename): Reset the pointer
grub_register_variable_hook ("root", 0, grub_env_write_root);
+ grub_machine_get_bootlocation (&fwdevice, &fwpath);
+
+ if (fwdevice)
+ {
+ char *cmdpath;
+
+ cmdpath = grub_xasprintf ("(%s)%s", fwdevice, fwpath ? : "");
+ if (cmdpath)
+ {
+ grub_env_set ("cmdpath", cmdpath);
+ grub_env_export ("cmdpath");
+ grub_free (cmdpath);
+ }
+ }
+
if (prefix)
{
char *pptr = NULL;
if (pptr[0])
path = grub_strdup (pptr);
}
- if ((!device || device[0] == ',' || !device[0]) || !path)
- grub_machine_get_bootlocation (&fwdevice, &fwpath);
if (!device && fwdevice)
device = fwdevice;