summaryrefslogtreecommitdiff
path: root/include/lib.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-09-01 08:14:49 +0100
committerLeah Rowe <leah@libreboot.org>2025-09-01 08:14:49 +0100
commited84d33e59b8b2cf1789eb591c592d921907dbdd (patch)
tree8e67bf7d04a0ef0dbdacd3028e4ae9acf5fa72a7 /include/lib.sh
parent40f064ae336f125762584be8a6ddd52d7ff1cd01 (diff)
lib.sh and rom.sh: stricter mktemp usage
error out under fault condition Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/lib.sh')
-rw-r--r--include/lib.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/lib.sh b/include/lib.sh
index f64a6a35..948d7f3f 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -114,7 +114,8 @@ unpad_one_byte()
fx_()
{
- fd="`mktemp`" && x_ rm -f "$fd" && x_ touch "$fd"
+ fd="`mktemp || err "can't create tmpfile"`" || err
+ x_ rm -f "$fd" && x_ touch "$fd"
xx="$1" && shift 1
"$@" 2>/dev/null | sort 1>"$fd" 2>/dev/null || err "FATAL: !sort fx_"
dx_ "$xx" "$fd" || :