diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-04-01 16:20:12 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-04-01 16:20:12 +0100 |
| commit | fb81b7b736659a142d4d4b140155a6492943661e (patch) | |
| tree | d50fb7363a7c170c2616022dadc77dd81bcd2ebf /util/libreboot-utils/lib/io.c | |
| parent | f68cedf202c1fc6c39243136a4d766bc1d67cc80 (diff) | |
lbutils/file: rename rw_file_exact
call it rw_exact, so that it's closer to
the name rw. it matches naming more closely;
the alternative was to call rw rw_file
but read/write can handle more than just files!
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/io.c')
| -rw-r--r-- | util/libreboot-utils/lib/io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/libreboot-utils/lib/io.c b/util/libreboot-utils/lib/io.c index 81f9f52a..801d4c53 100644 --- a/util/libreboot-utils/lib/io.c +++ b/util/libreboot-utils/lib/io.c @@ -108,7 +108,7 @@ read_file(void) /* read main file */ - _r = rw_file_exact(f->gbe_fd, f->buf, f->gbe_file_size, + _r = rw_exact(f->gbe_fd, f->buf, f->gbe_file_size, 0, IO_PREAD); if (_r < 0) @@ -116,7 +116,7 @@ read_file(void) /* copy to tmpfile */ - _r = rw_file_exact(f->tmp_fd, f->buf, f->gbe_file_size, + _r = rw_exact(f->tmp_fd, f->buf, f->gbe_file_size, 0, IO_PWRITE); if (_r < 0) @@ -139,7 +139,7 @@ read_file(void) if (fsync_on_eintr(f->tmp_fd) == -1) exitf("%s: fsync (tmpfile copy)", f->tname); - _r = rw_file_exact(f->tmp_fd, f->bufcmp, f->gbe_file_size, + _r = rw_exact(f->tmp_fd, f->bufcmp, f->gbe_file_size, 0, IO_PREAD); if (_r < 0) @@ -556,7 +556,7 @@ rw_gbe_file_exact(int fd, unsigned char *mem, size_t nrw, if (nrw > (size_t)GBE_PART_SIZE) goto err_rw_gbe_file_exact; - r = rw_file_exact(fd, mem, nrw, off, rw_type); + r = rw_exact(fd, mem, nrw, off, rw_type); return rw_over_nrw(r, nrw); |
