From 0229e845394ef8fe330b5d01b987a582f7604874 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 19 Mar 2026 18:36:59 +0000 Subject: util/nvmutil: remove arandom fallback on rand openbsd 2.1 has arc4random, which we detect here. arandom was apparently added much later, so this is dead code. remove it. Signed-off-by: Leah Rowe --- util/nvmutil/lib/num.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'util') diff --git a/util/nvmutil/lib/num.c b/util/nvmutil/lib/num.c index 91b85e5b..3ef2ad6f 100644 --- a/util/nvmutil/lib/num.c +++ b/util/nvmutil/lib/num.c @@ -131,17 +131,6 @@ retry_urandom_read: O_RDONLY | O_BINARY | O_NOFOLLOW | O_CLOEXEC); -#ifdef __OpenBSD__ -/* TODO: dead code - openbsd 2.1 had arc4random. - arandam was introduced **later** - */ - if (fd < 0) /* old openbsd */ - fd = open("/dev/arandom", - O_RDONLY | O_BINARY | O_NOFOLLOW | - O_CLOEXEC); -#endif - #ifdef PORTABLE_RAND_DEV #if (PORTABLE_RAND_DEV) > 0 /* WARNING: -- cgit v1.2.1