util/nvmutil: rename errval to nvm_errval

strtonum implementations in bsd sometimes have this
variable name. rename it to avoid conflict.

also removed the commentt errno values, since i'm
only ever setting it to valid values, as are the
syscalls that i'm using, so it should be ok.

i'm not writing a stub to check errno. that would
be far beyond the scope of nvmutil.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-03 21:50:10 +00:00
parent 21b8de87ff
commit f93a40ecb6
+3 -3
View File
@@ -630,7 +630,7 @@ err_if(int x)
}
static void
err(int errval, const char *msg, ...)
err(int nvm_errval, const char *msg, ...)
{
va_list args;
@@ -640,7 +640,7 @@ err(int errval, const char *msg, ...)
vfprintf(stderr, msg, args);
va_end(args);
set_err(errval);
set_err(nvm_errval);
fprintf(stderr, ": %s", strerror(errno));
fprintf(stderr, "\n");
@@ -667,7 +667,7 @@ set_err(int x)
if (errno)
return;
if (x)
errno = x; /* TODO: check x against system errno values */
errno = x;
else
errno = ECANCELED;
}