diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 03:27:25 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-26 06:59:41 +0000 |
| commit | b4154dd29b4b0b799ba2d2d734ceb6623ad75ef4 (patch) | |
| tree | b4e14c56461ffe849e323d649da8b6546a296c3d /util/nvmutil | |
| parent | a85f2898e2413fa7092f0b7c4821ea76da70f92c (diff) | |
util/nvmutil: minor cleanup: rw_file_once
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 3b289deb..abe94904 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1587,9 +1587,10 @@ rw_file_once(int fd, uint8_t *mem, size_t len, read_again: rv = do_rw(fd, mem + rc, len - rc, off + rc, rw_type); - if (rv < 0 && errno == EINTR) { + if (rv < 0 && errno == EINTR) goto read_again; - } else if (rv < 0) { + + if (rv < 0) { errno = EIO; return -1; } |
