mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 13:16:47 +02:00
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>
This commit is contained in:
@@ -287,7 +287,7 @@ rhex(void)
|
|||||||
{
|
{
|
||||||
static uint8_t n = 0, rnum[16];
|
static uint8_t n = 0, rnum[16];
|
||||||
if (!n)
|
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;
|
return rnum[n--] & 0xf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user