mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-14 15:29:35 +02:00
lbutils: simplify getprogname usage
the functions no longer return errors, so i don't need to handle them. furthermore, the handling in state.c is redundant, so i've removed that too. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -324,17 +324,13 @@ err_exit(int nvm_errval, const char *msg, ...)
|
||||
if (!errno)
|
||||
saved_errno = errno = ECANCELED;
|
||||
|
||||
if ((p = lbgetprogname()) != NULL)
|
||||
fprintf(stderr, "%s: ", p);
|
||||
fprintf(stderr, "%s: ", lbgetprogname());
|
||||
|
||||
va_start(args, msg);
|
||||
vfprintf(stderr, msg, args);
|
||||
va_end(args);
|
||||
|
||||
if (p != NULL)
|
||||
fprintf(stderr, ": %s\n", strerror(errno));
|
||||
else
|
||||
fprintf(stderr, "%s\n", strerror(errno));
|
||||
fprintf(stderr, ": %s\n", strerror(errno));
|
||||
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user