diff options
author | Sol Boucher <solb@chromium.org> | 2015-03-18 10:13:48 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-05-08 20:33:22 +0200 |
commit | b974081c13ad203a78fcdb28021706f55eaa5010 (patch) | |
tree | 08a3090babe8568168354146f4f49b05aee13ae3 /util/cbfstool/fmd_parser.y | |
parent | e3260a042f438cedb446c5e7b3dc6f55a3b9aa95 (diff) | |
download | coreboot-b974081c13ad203a78fcdb28021706f55eaa5010.tar.xz |
fmaptool: Conform to cbfstool's error message format
The tool now makes use of the ERROR() macros from common.h.
Change-Id: Ie38f40c65f7b6d3bc2adb97e246224cd38d4cb99
Signed-off-by: Sol Boucher <solb@chromium.org>
Reviewed-on: http://review.coreboot.org/10048
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/cbfstool/fmd_parser.y')
-rw-r--r-- | util/cbfstool/fmd_parser.y | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/util/cbfstool/fmd_parser.y b/util/cbfstool/fmd_parser.y index 292fba3d8a..2327ae4fbe 100644 --- a/util/cbfstool/fmd_parser.y +++ b/util/cbfstool/fmd_parser.y @@ -19,6 +19,7 @@ %{ #include "fmd_scanner.h" +#include "common.h" #include <stdlib.h> @@ -90,7 +91,7 @@ flash_region: region_name region_annotation_opt region_offset_opt char *annotation = $2; if (annotation && !fmd_process_annotation_impl(node, annotation)) { - fprintf(stderr, "ERROR: Section '%s' has unexpected annotation '(%s)'\n", + ERROR("Section '%s' has unexpected annotation '(%s)'\n", node->name, annotation); YYABORT; } @@ -101,7 +102,7 @@ flash_region: region_name region_annotation_opt region_offset_opt region_name: STRING { if (!$1) { - perror("ERROR: While allocating section name"); + perror("E: While allocating section name"); YYABORT; } }; @@ -125,7 +126,7 @@ region_list_entries: flash_region { struct descriptor_node *node = malloc(sizeof(*node)); if (!node) { - perror("ERROR: While allocating linked list node"); + perror("E: While allocating linked list node"); YYABORT; } node->val = $1; @@ -136,7 +137,7 @@ region_list_entries: flash_region { struct descriptor_node *node = malloc(sizeof(*node)); if (!node) { - perror("ERROR: While allocating linked list node"); + perror("E: While allocating linked list node"); YYABORT; } node->val = $2; @@ -155,7 +156,7 @@ struct flashmap_descriptor *parse_descriptor(char *name, { struct flashmap_descriptor *region = malloc(sizeof(*region)); if (!region) { - perror("ERROR: While allocating descriptor section"); + perror("E: While allocating descriptor section"); return NULL; } region->name = name; @@ -167,7 +168,7 @@ struct flashmap_descriptor *parse_descriptor(char *name, if (region->list_len) { region->list = malloc(region->list_len * sizeof(*region->list)); if (!region->list) { - perror("ERROR: While allocating node children array"); + perror("E: While allocating node children array"); return NULL; } struct descriptor_node *cur_node = children.head; |