discover/grub2: unknown commands should fail
[petitboot] / discover / grub2 / script.c
index 67b4b7801f8717d51df2cdbfc68edab97988f082..5fb13aa4f0979e24451471df8db627c4802ee26b 100644 (file)
@@ -246,7 +246,7 @@ int statement_simple_execute(struct grub2_script *script,
        entry = script_lookup_function(script, st->argv->argv[0]);
        if (!entry) {
                fprintf(stderr, "undefined function '%s'\n", st->argv->argv[0]);
-               return 0;
+               return 1;
        }
 
        rc = entry->fn(script, entry->data, st->argv->argc, st->argv->argv);