util/nvmutil: fix bsd build issue

urandom_fd is unavailable on bsd

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-09 17:44:48 +00:00
parent 85cc3071bb
commit 646e349893
+2 -1
View File
@@ -970,6 +970,7 @@ read_gbe_file_exact(int fd, void *buf, size_t len,
}
if (rval != -1) {
#ifndef NVMUTIL_ARC4RANDOM_BUF
if (fd == urandom_fd) {
/*
* /dev/[u]random reads can still return
@@ -986,7 +987,7 @@ read_gbe_file_exact(int fd, void *buf, size_t len,
return rval;
}
}
#endif
err(ECANCELED,
"Short %s, %zd bytes, on file: %s",
op ? op : "read", rval, path);