diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-10 15:50:45 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-10 15:50:45 +0000 |
| commit | 9691e7e7db7c604b03c69e72d4a25a79d6fc959a (patch) | |
| tree | eeaf342c7e9bbb8592d283b5104e7c34e2b03c1e /util/nvmutil/nvmutil.c | |
| parent | 59eac512eb926c8b63794e2b39e8ed35fe296451 (diff) | |
util/nvmutil: use set_err where appropriate
in the new file i/o functions, my own setting
of errno should be done with set_err. this
avoids clobbering what the real libc set.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 0b4220cd..3cf06338 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -703,7 +703,7 @@ xstrxcmp(const char *a, const char *b, size_t maxlen) /* * Should never reach here. This keeps compilers happy. */ - errno = EINVAL; + set_err(EINVAL); return -1; } @@ -1481,7 +1481,7 @@ prw(int fd, void *mem, size_t nrw, else if (rw_type == PSCHREIB) r = write(fd, mem, nrw); else { - errno = EINVAL; + set_err(EINVAL); return -1; } } while (r < 0 && errno == EINTR); |
