mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user