]> git.ozlabs.org Git - petitboot/blobdiff - discover/grub2/grub2.c
grub2/grub2: add Yocto paths to default grub2 conf search paths
[petitboot] / discover / grub2 / grub2.c
index 5b3009a465f7d43ac8f351c00aac7b1075fbd24b..f62ccdd1aa9be4271d1372660a3dd1a5590b8f43 100644 (file)
@@ -1,6 +1,7 @@
 
 #include <assert.h>
 #include <string.h>
 
 #include <assert.h>
 #include <string.h>
+#include <i18n/i18n.h>
 
 #include <talloc/talloc.h>
 #include <url/url.h>
 
 #include <talloc/talloc.h>
 #include <url/url.h>
@@ -20,6 +21,7 @@ static const char *const grub2_conf_files[] = {
        "/boot/grub/grub.cfg",
        "/boot/grub2/grub.cfg",
        "/boot/grub/menu.lst",
        "/boot/grub/grub.cfg",
        "/boot/grub2/grub.cfg",
        "/boot/grub/menu.lst",
+       "/efi/boot/grub.cfg",
        "/GRUB.CFG",
        "/MENU.LST",
        "/GRUB/GRUB.CFG",
        "/GRUB.CFG",
        "/MENU.LST",
        "/GRUB/GRUB.CFG",
@@ -27,6 +29,7 @@ static const char *const grub2_conf_files[] = {
        "/GRUB/MENU.LST",
        "/BOOT/GRUB/GRUB.CFG",
        "/BOOT/GRUB/MENU.LST",
        "/GRUB/MENU.LST",
        "/BOOT/GRUB/GRUB.CFG",
        "/BOOT/GRUB/MENU.LST",
+       "/EFI/BOOT/GRUB.CFG",
        NULL
 };
 
        NULL
 };
 
@@ -103,6 +106,9 @@ static int grub2_parse(struct discover_context *dc)
 
                parser = grub2_parser_create(dc);
                grub2_parser_parse(parser, *filename, buf, len);
 
                parser = grub2_parser_create(dc);
                grub2_parser_parse(parser, *filename, buf, len);
+               device_handler_status_dev_info(dc->handler, dc->device,
+                               _("Parsed GRUB configuration from %s"),
+                               *filename);
                talloc_free(buf);
                talloc_free(parser);
                break;
                talloc_free(buf);
                talloc_free(parser);
                break;