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>
This commit is contained in:
committed by
Stefan Reinauer
parent
e3260a042f
commit
b974081c13
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user