aboutsummaryrefslogtreecommitdiff
path: root/util/cbfstool/fmap_from_fmd.c
diff options
context:
space:
mode:
authorSol Boucher <solb@chromium.org>2015-03-18 10:13:48 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2015-05-08 20:33:22 +0200
commitb974081c13ad203a78fcdb28021706f55eaa5010 (patch)
tree08a3090babe8568168354146f4f49b05aee13ae3 /util/cbfstool/fmap_from_fmd.c
parente3260a042f438cedb446c5e7b3dc6f55a3b9aa95 (diff)
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/fmap_from_fmd.c')
-rw-r--r--util/cbfstool/fmap_from_fmd.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/util/cbfstool/fmap_from_fmd.c b/util/cbfstool/fmap_from_fmd.c
index fa1024bd57..267174386b 100644
--- a/util/cbfstool/fmap_from_fmd.c
+++ b/util/cbfstool/fmap_from_fmd.c
@@ -28,9 +28,8 @@ static bool fmap_append_fmd_node(struct fmap **flashmap,
const struct flashmap_descriptor *section,
unsigned absolute_watermark) {
if (strlen(section->name) >= FMAP_STRLEN) {
- fprintf(stderr,
- "ERROR: Section name ('%s') exceeds %d character FMAP format limit\n",
- section->name, FMAP_STRLEN - 1);
+ ERROR("Section name ('%s') exceeds %d character FMAP format limit\n",
+ section->name, FMAP_STRLEN - 1);
return false;
}
@@ -38,9 +37,8 @@ static bool fmap_append_fmd_node(struct fmap **flashmap,
if (fmap_append_area(flashmap, absolute_watermark, section->size,
(uint8_t *)section->name, 0) < 0) {
- fprintf(stderr,
- "ERROR: Failed to insert section '%s' into FMAP\n",
- section->name);
+ ERROR("Failed to insert section '%s' into FMAP\n",
+ section->name);
return false;
}
@@ -59,8 +57,7 @@ struct fmap *fmap_from_fmd(const struct flashmap_descriptor *desc)
assert(desc->size_known);
if (strlen(desc->name) >= FMAP_STRLEN) {
- fprintf(stderr,
- "ERROR: Image name ('%s') exceeds %d character FMAP header limit\n",
+ ERROR("Image name ('%s') exceeds %d character FMAP header limit\n",
desc->name, FMAP_STRLEN - 1);
return NULL;
}
@@ -68,7 +65,7 @@ struct fmap *fmap_from_fmd(const struct flashmap_descriptor *desc)
struct fmap *fmap = fmap_create(desc->offset_known ? desc->offset : 0,
desc->size, (uint8_t *)desc->name);
if (!fmap) {
- fputs("ERROR: Failed to allocate FMAP header\n", stderr);
+ ERROR("Failed to allocate FMAP header\n");
return fmap;
}