lib.sh and rom.sh: stricter mktemp usage

error out under fault condition

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-09-01 08:14:49 +01:00
parent 40f064ae33
commit ed84d33e59
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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" || :