]> git.ozlabs.org Git - petitboot/blobdiff - discover/grub2/parser-api.c
discover/grub2: Implement multiple-arv variable splitting
[petitboot] / discover / grub2 / parser-api.c
index f8915a1f52b3065b725f215918a1c5d4da669d17..aa5997851a7ad42947e6810e2deb41b7f1d1bba1 100644 (file)
@@ -28,7 +28,7 @@ struct grub2_statement *create_statement_menuentry(struct grub2_parser *parser,
        struct grub2_statement_menuentry *stmt =
                talloc(parser, struct grub2_statement_menuentry);
        stmt->st.type = STMT_TYPE_MENUENTRY;
-       stmt->st.exec = NULL;
+       stmt->st.exec = statement_menuentry_execute;
        stmt->argv = argv;
        stmt->statements = stmts;
        return &stmt->st;
@@ -73,6 +73,7 @@ struct grub2_word *create_word_text(struct grub2_parser *parser,
 {
        struct grub2_word *word = talloc(parser, struct grub2_word);
        word->type = GRUB2_WORD_TEXT;
+       word->split = false;
        word->text = talloc_strdup(word, text);
        word->next = NULL;
        word->last = word;
@@ -84,8 +85,8 @@ struct grub2_word *create_word_var(struct grub2_parser *parser,
 {
        struct grub2_word *word = talloc(parser, struct grub2_word);
        word->type = GRUB2_WORD_VAR;
-       word->var.name = talloc_strdup(word, name);
-       word->var.split = split;
+       word->name = talloc_strdup(word, name);
+       word->split = split;
        word->next = NULL;
        word->last = word;
        return word;