summaryrefslogtreecommitdiff
path: root/util/libreboot-utils/mkhtemp.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-29 15:48:49 +0100
committerLeah Rowe <leah@libreboot.org>2026-03-29 16:08:00 +0100
commite54862fcccca0325da8ae2879c1fa965267d3df0 (patch)
tree337f39085fc382cb56781dea4c329672d45e08a2 /util/libreboot-utils/mkhtemp.c
parent8657d084d2ae61a4cb06b5bc63223a92bfb5beb0 (diff)
lbmk: use mkhtemp in libreboot's build system
i added a fake -t option, which doesn't actually read optarg, so that -t usage can just override the normal template. mkhtemp isn't ready for distros yet, but it's ready for lbmk. i hacked the makefile to also copy the binary to mktemp, and i set PATH in lbmk so that this binary is used insttead of the one on your system. that way, upstream projects use it. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/libreboot-utils/mkhtemp.c')
-rw-r--r--util/libreboot-utils/mkhtemp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/util/libreboot-utils/mkhtemp.c b/util/libreboot-utils/mkhtemp.c
index de86a2bf..c9315b0c 100644
--- a/util/libreboot-utils/mkhtemp.c
+++ b/util/libreboot-utils/mkhtemp.c
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
xpledgex("stdio flock rpath wpath cpath", NULL);
while ((c =
- getopt(argc, argv, "qdp:")) != -1) {
+ getopt(argc, argv, "qdp:t")) != -1) {
switch (c) {
case 'd':
@@ -83,6 +83,12 @@ main(int argc, char *argv[])
/* (exit status unchanged) */
break;
+ case 't':
+ break; /* not supported yet. TODO */
+ /* configured above without optarg,
+ * so that it is treated as a normal
+ * template string */
+
default:
goto err_usage;
}