diff options
author | Zheng Bao <fishbaozi@gmail.com> | 2023-03-22 12:51:47 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-03-24 14:05:27 +0000 |
commit | c25d5935d3405be22c2bb638049e60d72a99f83e (patch) | |
tree | 10dbc4aeadab5783cc77c1225d02852002255763 | |
parent | f080cd5463d5b12ad854b18be6114d8d79243218 (diff) |
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>
-rw-r--r-- | util/amdfwtool/amdfwtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |