mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
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>
This commit is contained in:
@@ -428,7 +428,7 @@ char *new_tmpfile(int *fd, int local, const char *path);
|
|||||||
int x_i_mkstemp(char *template);
|
int x_i_mkstemp(char *template);
|
||||||
char *x_c_tmpdir(void);
|
char *x_c_tmpdir(void);
|
||||||
int x_i_close(int fd);
|
int x_i_close(int fd);
|
||||||
int x_i_fsync(int fd);
|
int fsync_on_eintr(int fd);
|
||||||
|
|
||||||
/* asserts */
|
/* asserts */
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ read_file(void)
|
|||||||
|
|
||||||
/* needs sync, for verification
|
/* 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);
|
err(errno, "%s: fsync (tmpfile copy)", f->tname);
|
||||||
|
|
||||||
_r = rw_file_exact(f->tmp_fd, f->bufcmp, f->gbe_file_size,
|
_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
|
* We may otherwise read from
|
||||||
* cache, so we must sync.
|
* 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)",
|
err(errno, "%s: fsync (pre-verification)",
|
||||||
f->tname);
|
f->tname);
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ gbe_mv(void)
|
|||||||
if (rval < 0)
|
if (rval < 0)
|
||||||
goto ret_gbe_mv;
|
goto ret_gbe_mv;
|
||||||
|
|
||||||
if (x_i_fsync(dest_fd) == -1)
|
if (fsync_on_eintr(dest_fd) == -1)
|
||||||
goto ret_gbe_mv;
|
goto ret_gbe_mv;
|
||||||
|
|
||||||
if (x_i_close(dest_fd) == -1)
|
if (x_i_close(dest_fd) == -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user