summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/nvmutil.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-24 16:35:40 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-24 16:35:40 +0000
commit56ab5a18fee5257c3c875f2b8597b8379c7b959c (patch)
treeed1e19ebc1e049d9dfd723a263db9d88a10aa5fe /util/libreboot-utils/nvmutil.c
parent9de01208b019d734f5dec6293d26f7039ddba9f0 (diff)
mkhtemp: show progname on error
i have my own getprogname implementation, because not every libc is good enough to include one. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/nvmutil.c')
-rw-r--r--util/libreboot-utils/nvmutil.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/libreboot-utils/nvmutil.c b/util/libreboot-utils/nvmutil.c
index fb45a97c..da7d40ec 100644
--- a/util/libreboot-utils/nvmutil.c
+++ b/util/libreboot-utils/nvmutil.c
@@ -35,6 +35,9 @@ main(int argc, char *argv[])
size_t c;
+ if (lbgetprogname(argv[0]) == NULL)
+ err_no_cleanup(errno, "could not set progname");
+
/* https://man.openbsd.org/pledge.2
https://man.openbsd.org/unveil.2 */
#if defined(__OpenBSD__) && defined(OpenBSD)