Leah Rowe
c2a70b7de0
libreboot-utils: simplify random tmpdir namegen
...
generalise it in rand.c because this logic will
be useful for other programs in the future.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 09:18:36 +01:00
Leah Rowe
45edcf33f7
lbutils: rename mkrbuf to rmalloc
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 08:37:32 +01:00
Leah Rowe
afe2e71c01
util/nvmutil: better hexdump
...
this is a more generic one that i implemented
for "lottery.c" (which is really just a tester
of my rset function in lib/rand.c)
i could probably actually write a full hexdump
program in libreboot-utils to be honest.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 07:22:34 +01:00
Leah Rowe
546565f321
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-29 07:09:06 +01:00
Leah Rowe
0f1a22174f
libreboot-utils: unified error handling
...
i now use a singleton hook function per program:
nvmutil, mkhtemp and lottery
call this at the startup of your program:
(void) errhook(exit_cleanup);
then provide that function. make it static,
so that each program has its own version.
if you're writing a program that handles lots
of files for example, and you want to do certain
cleanup on exit (including error exit), this can
be quite useful.
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 06:53:37 +00:00
Leah Rowe
998528c404
rand.c: fix initialisation bug in mrkbuf
...
should be null on bad return
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-28 02:27:00 +00:00
Leah Rowe
29296fc513
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 22:58:12 +00:00
Leah Rowe
1e23ee26b1
header
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 21:41:12 +00:00
Leah Rowe
db6e817ded
util/libreboot-utils: finish implementing hell
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 16:56:40 +00:00
Leah Rowe
5d6344292a
challenge
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-27 02:28:27 +00:00
Leah Rowe
a29a3ac6f6
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 23:02:00 +00:00
Leah Rowe
1a09efbbbe
cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 19:44:23 +00:00
Leah Rowe
d1ba9bae03
further cleanup
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 13:09:43 +00:00
Leah Rowe
10ecf32e33
libreboot-utils: improved randomness test
...
and the module bias handling is fully correct
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 10:52:11 +00:00
Leah Rowe
8522b5c391
more cleanup on rand.c
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
f4f3fe3e0a
libreboot-utils: tidy up rand.c
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
b84c929e64
rmalloc
...
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00
Leah Rowe
e0319f0116
util/libreboot-utils: randomisation test
...
to test the effectiveness of the rand function
Signed-off-by: Leah Rowe <leah@libreboot.org >
2026-03-26 06:59:42 +00:00