diff options
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 7095246a..369ae8c2 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -270,18 +270,13 @@ main(int argc, char *argv[]) } #endif -#ifdef HAVE_ARC4RANDOM_BUF - if (cmd_index == CMD_SETMAC) - printf("Randomisation method: arc4random_buf\n"); -#else -#if defined(__OpenBSD__) || defined(__FreeBSD__) || \ +#ifndef HAVE_ARC4RANDOM_BUF + open_dev_urandom(); +#elif defined(__OpenBSD__) || defined(__FreeBSD__) || \ defined(__NetBSD__) || defined(__APPLE__) || \ defined(__DragonFly__) err(ECANCELED, "Maintainer error: arc4random disabled on BSD/MacOS"); #endif - if (cmd_index == CMD_SETMAC) - open_dev_urandom(); -#endif open_gbe_file(); @@ -505,8 +500,6 @@ open_dev_urandom(void) { struct stat st_urandom_fd; - printf("Randomisation method: %s\n", newrandom); - /* * Try /dev/urandom first */ @@ -598,6 +591,12 @@ cmd_setmac(void) size_t partnum; uint8_t mac_updated = 0; + #ifdef HAVE_ARC4RANDOM_BUF + printf("Randomisation method: arc4random_buf\n"); + #else + printf("Randomisation method: %s\n", rname); + #endif + printf("MAC address to be written: %s\n", mac_str); parse_mac_string(); |
