diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-19 07:41:04 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-19 07:41:04 +0000 |
| commit | 2eee2b5cac33adf9e297842f98cdc1d9d3bdc0a2 (patch) | |
| tree | 091395784d10b2132e5815384ea944addd8792d8 /util/nvmutil | |
| parent | 6d0bb47b82bc1ef471f22d349c423892af090558 (diff) | |
nvmutil: rename x_i_fsync to fsync_on_eintr
that's what it does. waits on eintr.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/include/common.h | 2 | ||||
| -rw-r--r-- | util/nvmutil/lib/io.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index 961fbb1d..270e5994 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -428,7 +428,7 @@ char *new_tmpfile(int *fd, int local, const char *path); int x_i_mkstemp(char *template); char *x_c_tmpdir(void); int x_i_close(int fd); -int x_i_fsync(int fd); +int fsync_on_eintr(int fd); /* asserts */ diff --git a/util/nvmutil/lib/io.c b/util/nvmutil/lib/io.c index d9f7a897..e2db01f4 100644 --- a/util/nvmutil/lib/io.c +++ b/util/nvmutil/lib/io.c @@ -125,7 +125,7 @@ read_file(void) /* needs sync, for verification */ - if (x_i_fsync(f->tmp_fd) == -1) + if (fsync_on_eintr(f->tmp_fd) == -1) err(errno, "%s: fsync (tmpfile copy)", f->tname); _r = rw_file_exact(f->tmp_fd, f->bufcmp, f->gbe_file_size, @@ -227,7 +227,7 @@ write_to_gbe_bin(void) * We may otherwise read from * cache, so we must sync. */ - if (x_i_fsync(f->tmp_fd) == -1) + if (fsync_on_eintr(f->tmp_fd) == -1) err(errno, "%s: fsync (pre-verification)", f->tname); @@ -484,7 +484,7 @@ gbe_mv(void) if (rval < 0) goto ret_gbe_mv; - if (x_i_fsync(dest_fd) == -1) + if (fsync_on_eintr(dest_fd) == -1) goto ret_gbe_mv; if (x_i_close(dest_fd) == -1) |
