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>
This commit is contained in:
parent
b05edb1fea
commit
e48043b095
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue