From f06db344ad53c987e38970b55e119a5af36641e1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 25 Mar 2026 00:03:31 +0000 Subject: mkhtemp: fix err() calling it indirectly was out of the question. must call it directly. Signed-off-by: Leah Rowe --- util/libreboot-utils/nvmutil.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'util/libreboot-utils/nvmutil.c') diff --git a/util/libreboot-utils/nvmutil.c b/util/libreboot-utils/nvmutil.c index d9b91349..e02f60af 100644 --- a/util/libreboot-utils/nvmutil.c +++ b/util/libreboot-utils/nvmutil.c @@ -36,34 +36,34 @@ main(int argc, char *argv[]) size_t c; if (lbgetprogname(argv[0]) == NULL) - err_no_cleanup(errno, "could not set progname"); + err_no_cleanup(0, errno, "could not set progname"); /* https://man.openbsd.org/pledge.2 https://man.openbsd.org/unveil.2 */ #if defined(__OpenBSD__) && defined(OpenBSD) #if (OpenBSD) >= 604 if (pledge("stdio flock rpath wpath cpath unveil", NULL) == -1) - err_no_cleanup(errno, "pledge plus unveil, main"); + err_no_cleanup(0, errno, "pledge plus unveil, main"); if (unveil("/dev/null", "r") == -1) - err_no_cleanup(errno, "unveil r: /dev/null"); + err_no_cleanup(0, errno, "unveil r: /dev/null"); #elif (OpenBSD) >= 509 if (pledge("stdio flock rpath wpath cpath", NULL) == -1) - err_no_cleanup(errno, "pledge, main"); + err_no_cleanup(0, errno, "pledge, main"); #endif #endif #ifndef S_ISREG - err_no_cleanup(ECANCELED, + err_no_cleanup(0, ECANCELED, "Can't determine file types (S_ISREG undefined)"); #endif #if ((CHAR_BIT) != 8) - err_no_cleanup(ECANCELED, "Unsupported char size"); + err_no_cleanup(0, ECANCELED, "Unsupported char size"); #endif x = xstart(argc, argv); if (x == NULL) - err_no_cleanup(ECANCELED, "NULL state on init"); + err_no_cleanup(0, ECANCELED, "NULL state on init"); /* parse user command */ /* TODO: CHECK ACCESSES VIA xstatus() */ -- cgit v1.2.1