path: root/discover/grub2/grub2.h
diff options
authorJeremy Kerr <>2019-11-14 13:17:16 +0800
committerJeremy Kerr <>2019-11-29 13:54:10 +0800
commit2c132ebc93a44b7550b1fdb3f5f7b010e51f47e8 (patch)
tree4b61c5bbe62dfd2192b6c51d6a74cb0ccfaa8454 /discover/grub2/grub2.h
parenta9a9d575cdab5c32fcb374edf60f0e51f9f7ec9f (diff)
discover/grub2: expose internal parse function
Upcoming changes will need a method to parse a secondary file (to support the 'source' command), but not execute it as a new script. This change exposes the parsing code, separate from the execution code. Signed-off-by: Jeremy Kerr <>
Diffstat (limited to 'discover/grub2/grub2.h')
1 files changed, 6 insertions, 2 deletions
diff --git a/discover/grub2/grub2.h b/discover/grub2/grub2.h
index 323b461..668d070 100644
--- a/discover/grub2/grub2.h
+++ b/discover/grub2/grub2.h
@@ -204,9 +204,13 @@ struct grub2_file *grub2_parse_file(struct grub2_script *script,
struct discover_device *grub2_lookup_device(struct device_handler *handler,
const char *desc);
+/* internal parse api */
+int grub2_parser_parse(struct grub2_parser *parser, const char *filename,
+ char *buf, int len);
/* external parser api */
struct grub2_parser *grub2_parser_create(struct discover_context *ctx);
-void grub2_parser_parse(struct grub2_parser *parser, const char *filename,
- char *buf, int len);
+void grub2_parser_parse_and_execute(struct grub2_parser *parser,
+ const char *filename, char *buf, int len);
#endif /* GRUB2_H */
OpenPOWER on IntegriCloud