]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
add verbose information to linux platform check
authorAndrey Borzenkov <arvidjaar@gmail.com>
Mon, 16 Dec 2013 19:17:40 +0000 (23:17 +0400)
committerAndrey Borzenkov <arvidjaar@gmail.com>
Mon, 16 Dec 2013 19:17:40 +0000 (23:17 +0400)
As suggested by Vladimir Serbienko, add additional verbose output to inform
why we selected this specific platform.

ChangeLog
grub-core/osdep/linux/platform.c

index 2b7968f7c1e2df7e3a8a3786d01190194fa304f9..92262ceb1a33814a7a6bc8419509d5fe09d85c16 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 86561f7345d58e5f2984b3c541d957ae3f496a3a..4b9f6ef9da6e86860778156f12964b8402d336d4 100644 (file)
@@ -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";
 }