discover/grub2: Clean up error-handling for grub2 parser & lexer
[petitboot] / discover / grub2 / script.c
index 0cf21967450efb3fbdf22c76f901c1c312b4d9d1..d0b824aebcb9965e63d2ec0d0cb631da0a2dfc5d 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <stdlib.h>
 
+#include <log/log.h>
 #include <types/types.h>
 #include <talloc/talloc.h>
 
@@ -278,7 +279,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]);
+               pb_log("grub2: undefined function '%s'\n", st->argv->argv[0]);
                return 1;
        }