summaryrefslogtreecommitdiff
path: root/util/cbfstool/cbfs-mkpayload.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2013-01-28 14:39:43 +0800
committerDavid Hendricks <dhendrix@chromium.org>2013-02-01 05:54:24 +0100
commit4d87d4e09b38d152425f060f088f3a44b7dacfcb (patch)
treee94ad6f122cf0a92e68bffaa6ebaa4b5b363854a /util/cbfstool/cbfs-mkpayload.c
parent7fb692bd867b271834be797029a6b4f72e4601bd (diff)
downloadcoreboot-4d87d4e09b38d152425f060f088f3a44b7dacfcb.tar.xz
cbfstool: Add -v (verbose) output.
Add -v (verbose) to every command, and allow printing debug messages. Revise logging and debugging functions (fprintf(stderr,...), dprintf...) and verbose message printing with following macros: ERROR(xxx): E: xxx WARN(xxx) W: xxx LOG(xxx) xxx INFO(...) INFO: xxx (only when runs with -v ) DEBUG(...) DEBUG: xxx (only when runs with more than one -v) Example: cbfstool coreboot.rom print -v cbfstool coreboot.rom add -f file -n file -t raw -v -v Normal output (especially for parsing) should use printf, not any of these macros (see usage() and cbfs_locate(), cbfs_print_directory() for example). Change-Id: I167617da1a6eea2b07075b0eb38e3c9d85ea75dc Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: http://review.coreboot.org/2196 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'util/cbfstool/cbfs-mkpayload.c')
-rw-r--r--util/cbfstool/cbfs-mkpayload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/cbfs-mkpayload.c b/util/cbfstool/cbfs-mkpayload.c
index 7f01024bae..da04a75785 100644
--- a/util/cbfstool/cbfs-mkpayload.c
+++ b/util/cbfstool/cbfs-mkpayload.c
@@ -44,13 +44,13 @@ int parse_elf_to_payload(unsigned char *input, unsigned char **output,
int i;
if(!iself(input)){
- fprintf(stderr, "E: The payload file is not in ELF format!\n");
+ ERROR("The payload file is not in ELF format!\n");
return -1;
}
if (!((ehdr->e_machine == EM_ARM) && (arch == CBFS_ARCHITECTURE_ARMV7)) &&
!((ehdr->e_machine == EM_386) && (arch == CBFS_ARCHITECTURE_X86))) {
- fprintf(stderr, "E: The payload file has the wrong architecture\n");
+ ERROR("The payload file has the wrong architecture\n");
return -1;
}