[PATCH 09/14] discover/grub2: Add a reference from script to parser
Jeremy Kerr
jk at ozlabs.org
Wed Nov 20 13:43:01 AEDT 2019
Future commands will need to access the parser, so add a reference from
struct grub2_script.
Signed-off-by: Jeremy Kerr <jk at ozlabs.org>
---
discover/grub2/grub2.h | 1 +
discover/grub2/script.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/discover/grub2/grub2.h b/discover/grub2/grub2.h
index eabd6d6..323b461 100644
--- a/discover/grub2/grub2.h
+++ b/discover/grub2/grub2.h
@@ -91,6 +91,7 @@ struct grub2_statement_for {
};
struct grub2_script {
+ struct grub2_parser *parser;
struct grub2_statements *statements;
struct list environment;
struct list symtab;
diff --git a/discover/grub2/script.c b/discover/grub2/script.c
index 8a9d91d..34e0400 100644
--- a/discover/grub2/script.c
+++ b/discover/grub2/script.c
@@ -518,6 +518,7 @@ struct grub2_script *create_script(struct grub2_parser *parser,
script = talloc_zero(parser, struct grub2_script);
script->ctx = ctx;
+ script->parser = parser;
list_init(&script->symtab);
list_init(&script->options);
--
2.20.1
More information about the Petitboot
mailing list