summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.c
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-03 12:31:53 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-03 12:31:53 +0000
commit6770fa8ef2f3365ddd11729e13e5db2d4c775e57 (patch)
treeaae8cc46e1972dcf516664ec161ffdd9acac5b56 /util/nvmutil/nvmutil.c
parent188a3d012b64e77e2ed4ac0ec50e38be3889a00d (diff)
util/nvmutil: use read, not pread, on /dev/urandom
we always read from offset zero, so use read Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
-rw-r--r--util/nvmutil/nvmutil.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index e60501ab..68363bc8 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -287,7 +287,7 @@ rhex(void)
{
static uint8_t n = 0, rnum[16];
if (!n)
- err_if(pread(rfd, (uint8_t *) &rnum, (n = 15) + 1, 0) == -1);
+ err_if(read(rfd, (uint8_t *) &rnum, (n = 15) + 1) == -1);
return rnum[n--] & 0xf;
}