diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-03 19:53:09 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-03 19:53:09 +0000 |
| commit | fd515e4c2845abe55b5ef1ae7096ec149f8c483c (patch) | |
| tree | 09ad10a92ab0bdc70adbab83a5418cc79229fcbf | |
| parent | f4e477b5493313f4c920845ee2b69282b1b88c23 (diff) | |
util/nvmutil: print correct file name for urandom
err_if reports fname, not /dev/urandom
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rw-r--r-- | util/nvmutil/nvmutil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index fdf93c67..bb9210b0 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -347,8 +347,9 @@ rhex(void) if (!n) { n = sizeof(rnum) - 1; - err_if(read(rfd, (uint8_t *) &rnum, sizeof(rnum)) - != sizeof(rnum)); + if (read(rfd, (uint8_t *) &rnum, sizeof(rnum)) + != sizeof(rnum)) + err(ECANCELED, "Could not read from /dev/urandom"); } return rnum[n--] & 0xf; |
