diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 00:59:28 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-14 00:59:28 +0000 |
| commit | 8d6b28fcf7fd0e347ad1c7fe2982aef7309b0ab8 (patch) | |
| tree | e93fb8625a1865698ed1723052ba652f39af826a /util/nvmutil | |
| parent | f01657c826835afafe38ba5305e46c75b89574f7 (diff) | |
util/nvmutil: rename err_eagain() to try_err()
makes more sense in code
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 34db6b92..625e1aaa 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -339,7 +339,7 @@ static ssize_t prw(int fd, void *mem, size_t nrw, static int rw_over_nrw(ssize_t r, size_t nrw); static off_t lseek_eintr(int fd, off_t off, int whence, int loop_eagain, int loop_eintr); -static int err_eagain(int loop_err, int errval); +static int try_err(int loop_err, int errval); /* * Error handling and cleanup @@ -1722,8 +1722,8 @@ try_rw_again: else if (rw_type == IO_READ) r = read(fd, mem, nrw); - if (r == -1 && (errno == err_eagain(loop_eintr, EINTR) - || errno == err_eagain(loop_eagain, EAGAIN))) + if (r == -1 && (errno == try_err(loop_eintr, EINTR) + || errno == try_err(loop_eagain, EAGAIN))) goto try_rw_again; return rw_over_nrw(r, nrw); @@ -1757,8 +1757,8 @@ try_rw_again: r = rw_over_nrw(r, nrw); } while (r == -1 && - (errno == err_eagain(loop_eintr, EINTR) - || errno == err_eagain(loop_eagain, EAGAIN))); + (errno == try_err(loop_eintr, EINTR) + || errno == try_err(loop_eagain, EAGAIN))); saved_errno = errno; if (lseek_eintr(fd, off_orig, SEEK_SET, @@ -1828,14 +1828,14 @@ lseek_eintr(int fd, off_t off, int whence, old = lseek(fd, off, whence); } while (old == (off_t)-1 && (!( - errno == err_eagain(loop_eintr, EINTR) || - errno == err_eagain(loop_eagain, EAGAIN)))); + errno == try_err(loop_eintr, EINTR) || + errno == try_err(loop_eagain, EAGAIN)))); return old; } static int -err_eagain(int loop_err, int errval) +try_err(int loop_err, int errval) { if (loop_err) return errval; |
