cbfstool: passing a header is now mandatory for converters

Change-Id: Iea5377af735b06bcaefb999547a8896b1c70763a
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/11330
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi 2015-08-25 20:17:14 +02:00 committed by Patrick Georgi
parent e590358064
commit dc9dbc0059
1 changed files with 3 additions and 6 deletions

View File

@ -247,8 +247,7 @@ static int cbfstool_convert_mkstage(struct buffer *buffer, uint32_t *offset,
buffer_delete(buffer); buffer_delete(buffer);
// direct assign, no dupe. // direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer)); memcpy(buffer, &output, sizeof(*buffer));
if (header) header->len = htonl(output.size);
header->len = htonl(output.size);
return 0; return 0;
} }
@ -279,8 +278,7 @@ static int cbfstool_convert_mkpayload(struct buffer *buffer,
buffer_delete(buffer); buffer_delete(buffer);
// direct assign, no dupe. // direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer)); memcpy(buffer, &output, sizeof(*buffer));
if (header) header->len = htonl(output.size);
header->len = htonl(output.size);
return 0; return 0;
} }
@ -297,8 +295,7 @@ static int cbfstool_convert_mkflatpayload(struct buffer *buffer,
buffer_delete(buffer); buffer_delete(buffer);
// direct assign, no dupe. // direct assign, no dupe.
memcpy(buffer, &output, sizeof(*buffer)); memcpy(buffer, &output, sizeof(*buffer));
if (header) header->len = htonl(output.size);
header->len = htonl(output.size);
return 0; return 0;
} }