summaryrefslogtreecommitdiff
path: root/util/cbfstool/elogtool.c
diff options
context:
space:
mode:
authorRicardo Quesada <ricardoq@google.com>2021-09-20 17:17:07 -0700
committerPaul Fagerburg <pfagerburg@chromium.org>2021-09-21 01:02:56 +0000
commite48043b095fab14af7c81868de618daa61f515ae (patch)
treed3421bdf701eec34b27af34b7c5333a7f384b21a /util/cbfstool/elogtool.c
parentb05edb1fea25c71c802ba5bc6c64c7f9cb9a5e85 (diff)
elogtool: compile in 32-bit platforms
This CL fixes a compilation error that happens in 32-bit platforms. This error happens because printf() was using %ld instead of %zu to print size_t variables. This CL fixes it. BUG=b:200608182 TEST=emerge-kevin (ARM 32-bit) TEST=emerge-eve (Intel 64-bit) Change-Id: I340e108361c052601f2b126db45caf2e35ee7ace Signed-off-by: Ricardo Quesada <ricardoq@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57792 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'util/cbfstool/elogtool.c')
-rw-r--r--util/cbfstool/elogtool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/cbfstool/elogtool.c b/util/cbfstool/elogtool.c
index 4cce5a699a..253e2ee95a 100644
--- a/util/cbfstool/elogtool.c
+++ b/util/cbfstool/elogtool.c
@@ -250,7 +250,7 @@ static void cmd_add_usage(void)
"<event_type>: an hexadecimal number (0-255). Prefix '0x' is optional\n"
"[event_data]: (optional) a series of hexadecimal numbers. Must be:\n"
" - len(event_data) %% 2 == 0\n"
- " - len(event_data) in bytes <= %ld\n"
+ " - len(event_data) in bytes <= %zu\n"
"\n"
"Example:\n"
"%s add 0x16 01ABF0 # 01ABF0 is actually three bytes: 0x01, 0xAB and 0xF0\n"
@@ -300,7 +300,7 @@ static int cmd_add_parse_args(uint8_t *type, uint8_t *data, size_t *data_size)
if (*data_size > ELOG_MAX_EVENT_DATA_SIZE) {
fprintf(stderr,
- "Error: Event data length (in bytes) should be <= %ld; got: %ld\n",
+ "Error: Event data length (in bytes) should be <= %zu; got: %zu\n",
ELOG_MAX_EVENT_DATA_SIZE, *data_size);
return ELOGTOOL_EXIT_BAD_ARGS;
}