From 3174806b3f7435a12896356bbca58394096ecb5a Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Tue, 10 Mar 2026 15:38:30 +0000 Subject: util/nvmutil: fix /dev/random fallback i forgot to set urandom_fd Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util/nvmutil/nvmutil.c') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 2971eab4..c47447f9 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -728,7 +728,8 @@ open_dev_urandom(void) errno = 0; rname = oldrandom; - if (open(rname, O_RDONLY | O_BINARY | O_NONBLOCK) == -1) + urandom_fd = open(rname, O_RDONLY | O_BINARY | O_NONBLOCK); + if (urandom_fd == -1) err(errno, "%s: could not open", rname); } -- cgit v1.2.1