add verbose information to linux platform check
As suggested by Vladimir Serbienko, add additional verbose output to inform why we selected this specific platform.
This commit is contained in:
parent
35248820ea
commit
840a2c0592
2 changed files with 19 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-12-16 Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
|
||||
* grub-core/osdep/linux/platform.c (grub_install_get_default_x86_platform):
|
||||
Add verbose information which firmware directories were tried.
|
||||
|
||||
2013-12-16 Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
|
||||
* grub-core/osdep/unix/exec.c (grub_util_exec_redirect_all): New
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <grub/util/install.h>
|
||||
#include <grub/emu/exec.h>
|
||||
#include <grub/emu/misc.h>
|
||||
#include <sys/types.h>
|
||||
#include <dirent.h>
|
||||
#include <string.h>
|
||||
|
@ -71,15 +72,24 @@ grub_install_get_default_x86_platform (void)
|
|||
*/
|
||||
grub_util_exec_redirect_all ((const char * []){ "modprobe", "efivars", NULL },
|
||||
NULL, NULL, "/dev/null");
|
||||
|
||||
grub_util_info ("Looking for /sys/firmware/efi ..");
|
||||
if (is_not_empty_directory ("/sys/firmware/efi"))
|
||||
{
|
||||
grub_util_info ("...found");
|
||||
if (is_64_kernel ())
|
||||
return "x86_64-efi";
|
||||
else
|
||||
return "i386-efi";
|
||||
}
|
||||
else if (is_not_empty_directory ("/proc/device-tree"))
|
||||
return "i386-ieee1275";
|
||||
else
|
||||
return "i386-pc";
|
||||
|
||||
grub_util_info ("... not found. Looking for /proc/device-tree ..");
|
||||
if (is_not_empty_directory ("/proc/device-tree"))
|
||||
{
|
||||
grub_util_info ("...found");
|
||||
return "i386-ieee1275";
|
||||
}
|
||||
|
||||
grub_util_info ("... not found");
|
||||
return "i386-pc";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue