From fd515e4c2845abe55b5ef1ae7096ec149f8c483c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 3 Mar 2026 19:53:09 +0000 Subject: util/nvmutil: print correct file name for urandom err_if reports fname, not /dev/urandom Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/nvmutil/nvmutil.c') 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; -- cgit v1.2.1