amdfwtool: Call wrapper funtion to write file
Don't call system call directly. Change-Id: I6da31723bc2bfc1197fc31962053671c84ccc397 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73911 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
parent
f080cd5463
commit
c25d5935d3
|
@ -2392,7 +2392,7 @@ int main(int argc, char **argv)
|
||||||
ctx.current - offset : sizeof(*amd_romsig);
|
ctx.current - offset : sizeof(*amd_romsig);
|
||||||
uint32_t ret_bytes;
|
uint32_t ret_bytes;
|
||||||
|
|
||||||
ret_bytes = write(targetfd, BUFF_OFFSET(ctx, offset), bytes);
|
ret_bytes = write_from_buf_to_file(targetfd, BUFF_OFFSET(ctx, offset), bytes);
|
||||||
if (bytes != ret_bytes) {
|
if (bytes != ret_bytes) {
|
||||||
fprintf(stderr, "Error: Writing to file %s failed\n", output);
|
fprintf(stderr, "Error: Writing to file %s failed\n", output);
|
||||||
retval = 1;
|
retval = 1;
|
||||||
|
|
Loading…
Reference in New Issue