From c25d5935d3405be22c2bb638049e60d72a99f83e Mon Sep 17 00:00:00 2001 From: Zheng Bao Date: Wed, 22 Mar 2023 12:51:47 +0800 Subject: amdfwtool: Call wrapper funtion to write file Don't call system call directly. Change-Id: I6da31723bc2bfc1197fc31962053671c84ccc397 Signed-off-by: Zheng Bao Reviewed-on: https://review.coreboot.org/c/coreboot/+/73911 Tested-by: build bot (Jenkins) Reviewed-by: Fred Reitberger --- util/amdfwtool/amdfwtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/amdfwtool/amdfwtool.c') diff --git a/util/amdfwtool/amdfwtool.c b/util/amdfwtool/amdfwtool.c index 8190b8dc2a..fb371e7487 100644 --- a/util/amdfwtool/amdfwtool.c +++ b/util/amdfwtool/amdfwtool.c @@ -2392,7 +2392,7 @@ int main(int argc, char **argv) ctx.current - offset : sizeof(*amd_romsig); 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) { fprintf(stderr, "Error: Writing to file %s failed\n", output); retval = 1; -- cgit v1.2.3