-
- parser = grub2_parser_create(dc);
-
- grub2_parser_parse(parser, buf, len);
-
- talloc_free(parser);
-
- return 1;
+ int len, rc;
+ char *buf;
+
+ /* Support block device boot only at present */
+ if (dc->event)
+ return -1;
+
+ for (filename = grub2_conf_files; *filename; filename++) {
+ rc = parser_request_file(dc, dc->device, *filename, &buf, &len);
+ if (rc)
+ continue;
+
+ 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;
+ }
+
+
+ return 0;