From 4b35d9ac290efaed02639567f7bc47c739b7c586 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 19 Mar 2026 07:48:53 +0000 Subject: nvmutil: rename lseek_loop to lseek_on_eintr that's what it does! Signed-off-by: Leah Rowe --- util/nvmutil/include/common.h | 2 +- util/nvmutil/lib/file.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'util') diff --git a/util/nvmutil/include/common.h b/util/nvmutil/include/common.h index e5bad238..4173ca6e 100644 --- a/util/nvmutil/include/common.h +++ b/util/nvmutil/include/common.h @@ -404,7 +404,7 @@ int check_file(int fd, struct stat *st); long rw_over_nrw(long r, unsigned long nrw); #if !defined(HAVE_REAL_PREAD_PWRITE) || \ HAVE_REAL_PREAD_PWRITE < 1 -off_t lseek_loop(int fd, off_t off, +off_t lseek_on_eintr(int fd, off_t off, int whence, int loop_eagain, int loop_eintr); #endif int try_err(int loop_err, int errval); diff --git a/util/nvmutil/lib/file.c b/util/nvmutil/lib/file.c index e3e1ccfe..408562dc 100644 --- a/util/nvmutil/lib/file.c +++ b/util/nvmutil/lib/file.c @@ -673,14 +673,14 @@ real_pread_pwrite: HAVE_REAL_PREAD_PWRITE > 0 goto real_pread_pwrite; #else - if ((off_orig = lseek_loop(fd, (off_t)0, SEEK_CUR, + if ((off_orig = lseek_on_eintr(fd, (off_t)0, SEEK_CUR, loop_eagain, loop_eintr)) == (off_t)-1) { r = -1; - } else if (lseek_loop(fd, off, SEEK_SET, + } else if (lseek_on_eintr(fd, off, SEEK_SET, loop_eagain, loop_eintr) == (off_t)-1) { r = -1; } else { - verified = lseek_loop(fd, (off_t)0, SEEK_CUR, + verified = lseek_on_eintr(fd, (off_t)0, SEEK_CUR, loop_eagain, loop_eintr); /* @@ -695,7 +695,7 @@ real_pread_pwrite: * that nothing is touching it now. */ if (off_reset && off != verified) - lseek_loop(fd, off, SEEK_SET, + lseek_on_eintr(fd, off, SEEK_SET, loop_eagain, loop_eintr); do { @@ -716,7 +716,7 @@ real_pread_pwrite: * will cause an exit, including * per EINTR/EAGAIN re-spin. */ - verified = lseek_loop(fd, (off_t)0, SEEK_CUR, + verified = lseek_on_eintr(fd, (off_t)0, SEEK_CUR, loop_eagain, loop_eintr); if (off != verified) @@ -739,7 +739,7 @@ real_pread_pwrite: saved_errno = errno; - off_last = lseek_loop(fd, off_orig, SEEK_SET, + off_last = lseek_on_eintr(fd, off_orig, SEEK_SET, loop_eagain, loop_eintr); if (off_last != off_orig) { @@ -869,12 +869,12 @@ err_rw_over_nrw: #if !defined(HAVE_REAL_PREAD_PWRITE) || \ HAVE_REAL_PREAD_PWRITE < 1 /* - * lseek_loop() does lseek() but optionally + * lseek_on_eintr() does lseek() but optionally * on an EINTR/EAGAIN wait loop. Used by prw() * for setting offsets for positional I/O. */ off_t -lseek_loop(int fd, off_t off, int whence, +lseek_on_eintr(int fd, off_t off, int whence, int loop_eagain, int loop_eintr) { off_t old; -- cgit v1.2.1