summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/string.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-25 00:03:31 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-25 00:03:31 +0000
commitf06db344ad53c987e38970b55e119a5af36641e1 (patch)
treedc3ae6c5ac3ae9b37d4cb3fc32f6d7e480d3c78c /util/libreboot-utils/lib/string.c
parent3ddd7a0d36ef5f3d98f6e25efbdaf479d66cc35a (diff)
mkhtemp: fix err()mkhtemp-wip
calling it indirectly was out of the question. must call it directly. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/lib/string.c')
-rw-r--r--util/libreboot-utils/lib/string.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/libreboot-utils/lib/string.c b/util/libreboot-utils/lib/string.c
index 2f2be5f3..ea7ca30a 100644
--- a/util/libreboot-utils/lib/string.c
+++ b/util/libreboot-utils/lib/string.c
@@ -119,7 +119,7 @@ slen(const char *s,
/* the one for nvmutil state is in state.c */
/* this one just exits */
void
-err_no_cleanup(int nvm_errval, const char *msg, ...)
+err_no_cleanup(int stfu, int nvm_errval, const char *msg, ...)
{
va_list args;
int saved_errno = errno;
@@ -141,7 +141,10 @@ err_no_cleanup(int nvm_errval, const char *msg, ...)
vfprintf(stderr, msg, args);
va_end(args);
- fprintf(stderr, ": %s\n", strerror(errno));
+ if (p != NULL)
+ fprintf(stderr, ": %s\n", strerror(errno));
+ else
+ fprintf(stderr, "%s\n", strerror(errno));
exit(EXIT_FAILURE);
}