summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-10 15:38:30 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-10 15:38:30 +0000
commit3174806b3f7435a12896356bbca58394096ecb5a (patch)
treedd7e27b0f5a86a232d05224b40015d59f6c81f1d /util/nvmutil
parent318c0eb95bd08d8598e6767b738a18cca987c54e (diff)
util/nvmutil: fix /dev/random fallback
i forgot to set urandom_fd Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 2971eab4..c47447f9 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -728,7 +728,8 @@ open_dev_urandom(void)
errno = 0;
rname = oldrandom;
- if (open(rname, O_RDONLY | O_BINARY | O_NONBLOCK) == -1)
+ urandom_fd = open(rname, O_RDONLY | O_BINARY | O_NONBLOCK);
+ if (urandom_fd == -1)
err(errno, "%s: could not open", rname);
}