summaryrefslogtreecommitdiffstats
path: root/discover/grub2/grub2.h
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-13 11:53:46 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-24 13:14:59 +0800
commit352621fe8719c8488098719240252bc04c303963 (patch)
tree7c398b578c425434aabe3f12e2d8633058ed80f8 /discover/grub2/grub2.h
parent84a286992f5c2d100583686a84d533c3e1256562 (diff)
downloadtalos-petitboot-352621fe8719c8488098719240252bc04c303963.tar.gz
talos-petitboot-352621fe8719c8488098719240252bc04c303963.zip
discover/grub2: Add initial execution code
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/grub2/grub2.h')
-rw-r--r--discover/grub2/grub2.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/discover/grub2/grub2.h b/discover/grub2/grub2.h
index 33180d4..07a1e6c 100644
--- a/discover/grub2/grub2.h
+++ b/discover/grub2/grub2.h
@@ -5,7 +5,7 @@
#include <stdbool.h>
#include <list/list.h>
-struct grub2_parser;
+struct grub2_script;
struct grub2_word {
const char *text;
@@ -31,6 +31,8 @@ struct grub2_statement {
STMT_TYPE_IF,
STMT_TYPE_BLOCK,
} type;
+ int (*exec)(struct grub2_script *,
+ struct grub2_statement *);
};
struct grub2_statement_simple {
@@ -96,6 +98,12 @@ void argv_append(struct grub2_argv *argv, struct grub2_word *word);
void word_append(struct grub2_word *w1, struct grub2_word *w2);
/* script interface */
+void script_execute(struct grub2_script *script);
+
+int statement_simple_execute(struct grub2_script *script,
+ struct grub2_statement *statement);
+int statement_if_execute(struct grub2_script *script,
+ struct grub2_statement *statement);
struct grub2_script *create_script(void *ctx);
OpenPOWER on IntegriCloud