mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
util/nvmutil: properly reset lseek on error
don't return. set r instead. this will fall through and return the same way, but with proper reset. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -1719,10 +1719,9 @@ try_rw_again:
|
|||||||
goto err_prw;
|
goto err_prw;
|
||||||
|
|
||||||
if ((off_orig = lseek_eintr(fd, (off_t)0, SEEK_CUR)) == (off_t)-1)
|
if ((off_orig = lseek_eintr(fd, (off_t)0, SEEK_CUR)) == (off_t)-1)
|
||||||
return -1;
|
r = -1;
|
||||||
|
else if (lseek_eintr(fd, off, SEEK_SET) == (off_t)-1)
|
||||||
if (lseek_eintr(fd, off, SEEK_SET) == (off_t)-1)
|
r = -1;
|
||||||
return -1;
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (rw_type == IO_PREAD)
|
if (rw_type == IO_PREAD)
|
||||||
|
|||||||
Reference in New Issue
Block a user