summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-04-21 19:05:26 +0100
committerLeah Rowe <leah@libreboot.org>2026-04-21 19:05:26 +0100
commit7b5349e85de026666cd095883307b21e0b7786e2 (patch)
tree6d769e3a0402beb6a90a7d0451b293aa0f817fc8
parentb947150f8a86990d55fd12e7b2b90f666ed56fce (diff)
disable lbutils on non-linux systems
i should probably test musl as well, on linux libreboot-utils is stable on the glibc systems i tested with linux. it is quite buggy on bsd systems. it's irresponsible to let users compile this until i've properly tested the code. putting this error in for now. i made lbmk use the old nvmutil version for now, and retro fitted several improvements to i/o there from lbutils, changes that i know are stable on bsd. Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--util/libreboot-utils/lottery.c3
-rw-r--r--util/libreboot-utils/mkhtemp.c3
-rw-r--r--util/libreboot-utils/nvmutil.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/util/libreboot-utils/lottery.c b/util/libreboot-utils/lottery.c
index 38407512..3ac4d135 100644
--- a/util/libreboot-utils/lottery.c
+++ b/util/libreboot-utils/lottery.c
@@ -16,6 +16,9 @@ exit_cleanup(void);
int
main(int argc, char **argv)
{
+#ifndef __linux__
+#error This code is currently buggy on BSD systems. Only use on Linux.
+#endif
int same = 0;
char *buf;
size_t size = BUFSIZ;
diff --git a/util/libreboot-utils/mkhtemp.c b/util/libreboot-utils/mkhtemp.c
index d6300f16..9ff70328 100644
--- a/util/libreboot-utils/mkhtemp.c
+++ b/util/libreboot-utils/mkhtemp.c
@@ -41,6 +41,9 @@ exit_cleanup(void);
int
main(int argc, char *argv[])
{
+#ifndef __linux__
+#error This code is currently buggy on BSD systems. Only use on Linux.
+#endif
size_t len;
size_t tlen;
size_t xc = 0;
diff --git a/util/libreboot-utils/nvmutil.c b/util/libreboot-utils/nvmutil.c
index 09801585..67b01ae7 100644
--- a/util/libreboot-utils/nvmutil.c
+++ b/util/libreboot-utils/nvmutil.c
@@ -27,6 +27,9 @@ exit_cleanup(void);
int
main(int argc, char *argv[])
{
+#ifndef __linux__
+#error This code is currently buggy on BSD systems. Only use on Linux.
+#endif
struct xstate *x;
struct commands *cmd;
struct xfile *f;