diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-14 22:25:34 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-14 22:25:34 +0000 |
| commit | 0a4257f4edba883877362bd6f2d7d0265879d1d3 (patch) | |
| tree | 40b9404953f25ff4cb2a16d5ff7a234d659ca79d /util/nvmutil/nvmutil.c | |
| parent | f229c722a93c05abcc4cd544681d8d0cd1cfe204 (diff) | |
util/nvmutil: clean up pwrite/pread case
some unused variables if enabled. hide them.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 0f5b7592..4a550e71 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -412,8 +412,11 @@ static ssize_t prw(int fd, void *mem, size_t nrw, off_t off, int rw_type, int loop_eagain, int loop_eintr); static int check_file(int fd, struct stat *st); static ssize_t rw_over_nrw(ssize_t r, size_t nrw); +#if !defined(HAVE_REAL_PREAD_PWRITE) || \ + HAVE_REAL_PREAD_PWRITE < 1 static off_t lseek_loop(int fd, off_t off, int whence, int loop_eagain, int loop_eintr); +#endif static int try_err(int loop_err, int errval); /* @@ -1945,13 +1948,16 @@ prw(int fd, void *mem, size_t nrw, off_t off, int rw_type, int loop_eagain, int loop_eintr) { - off_t off_orig; - off_t off_last; ssize_t r; - int saved_errno; int positional_rw; struct stat st; +#if !defined(HAVE_REAL_PREAD_PWRITE) || \ + HAVE_REAL_PREAD_PWRITE < 1 + int saved_errno; off_t verified; + off_t off_orig; + off_t off_last; +#endif if (mem == NULL) goto err_prw; |
