summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/lib/file.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/file.c
parent3ddd7a0d36ef5f3d98f6e25efbdaf479d66cc35a (diff)
mkhtemp: fix err()
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/file.c')
-rw-r--r--util/libreboot-utils/lib/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/libreboot-utils/lib/file.c b/util/libreboot-utils/lib/file.c
index 46d5e016..552618d6 100644
--- a/util/libreboot-utils/lib/file.c
+++ b/util/libreboot-utils/lib/file.c
@@ -96,16 +96,16 @@ void
xopen(int *fd_ptr, const char *path, int flags, struct stat *st)
{
if ((*fd_ptr = open(path, flags)) < 0)
- err_no_cleanup(errno, "%s", path);
+ err_no_cleanup(0, errno, "%s", path);
if (fstat(*fd_ptr, st) < 0)
- err_no_cleanup(errno, "%s: stat", path);
+ err_no_cleanup(0, errno, "%s: stat", path);
if (!S_ISREG(st->st_mode))
- err_no_cleanup(errno, "%s: not a regular file", path);
+ err_no_cleanup(0, errno, "%s: not a regular file", path);
if (lseek_on_eintr(*fd_ptr, 0, SEEK_CUR, 1, 1) == (off_t)-1)
- err_no_cleanup(errno, "%s: file not seekable", path);
+ err_no_cleanup(0, errno, "%s: file not seekable", path);
}
/* fsync() the directory of a file,