diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 15:45:58 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 15:45:58 +0800 |
commit | ffc167572a9d56c52908aebefe62ba3e3e2a9cf8 (patch) | |
tree | 9878d068dc4994dcad32c37ea6321f0995193ab2 /discover/grub2/script.c | |
parent | 300859ca50c0ea5d9c17d27fd3e3538ce966e08a (diff) | |
download | talos-petitboot-ffc167572a9d56c52908aebefe62ba3e3e2a9cf8.tar.gz talos-petitboot-ffc167572a9d56c52908aebefe62ba3e3e2a9cf8.zip |
discover/grub2: Clean up error-handling for grub2 parser & lexer
Rather than printf() & exit(), use the pb logging functions and abort
the parse.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/grub2/script.c')
-rw-r--r-- | discover/grub2/script.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discover/grub2/script.c b/discover/grub2/script.c index 0cf2196..d0b824a 100644 --- a/discover/grub2/script.c +++ b/discover/grub2/script.c @@ -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; } |