]> git.ozlabs.org Git - petitboot/blobdiff - discover/grub2/grub2.h
discover: Bring down configured interfaces on discover server exit.
[petitboot] / discover / grub2 / grub2.h
index c7f43de252e9623732e699005df535bf0327f583..61662892f615e5a1fc0069a29180faa0a2772680 100644 (file)
@@ -89,6 +89,8 @@ struct grub2_script {
        struct list                     symtab;
        struct discover_context         *ctx;
        struct discover_boot_option     *opt;
+       const char                      *filename;
+       unsigned int                    n_options;
 };
 
 struct grub2_parser {
@@ -143,6 +145,8 @@ void script_execute(struct grub2_script *script);
 
 int statement_simple_execute(struct grub2_script *script,
                struct grub2_statement *statement);
+int statement_block_execute(struct grub2_script *script,
+               struct grub2_statement *statement);
 int statement_if_execute(struct grub2_script *script,
                struct grub2_statement *statement);
 int statement_menuentry_execute(struct grub2_script *script,
@@ -164,7 +168,7 @@ void script_register_function(struct grub2_script *script,
 void register_builtins(struct grub2_script *script);
 
 /* resources */
-struct resource *create_grub2_resource(void *ctx,
+struct resource *create_grub2_resource(struct discover_boot_option *opt,
                struct discover_device *orig_device,
                const char *root, const char *path);
 
@@ -173,6 +177,7 @@ bool resolve_grub2_resource(struct device_handler *handler,
 
 /* external parser api */
 struct grub2_parser *grub2_parser_create(struct discover_context *ctx);
-void grub2_parser_parse(struct grub2_parser *parser, char *buf, int len);
+void grub2_parser_parse(struct grub2_parser *parser, const char *filename,
+               char *buf, int len);
 #endif /* GRUB2_H */