From 9691e7e7db7c604b03c69e72d4a25a79d6fc959a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 10 Mar 2026 15:50:45 +0000 Subject: 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 --- util/nvmutil/nvmutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/nvmutil/nvmutil.c') 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); -- cgit v1.2.1