aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsirand/fsirand.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsirand/fsirand.c')
-rw-r--r--sbin/fsirand/fsirand.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index f24d34705b72..48ffcbaf0665 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -83,8 +83,6 @@ main(int argc, char *argv[])
if (argc - optind < 1)
usage();
- srandomdev();
-
/* Increase our data size to the max */
if (getrlimit(RLIMIT_DATA, &rl) == 0) {
rl.rlim_cur = rl.rlim_max;
@@ -167,7 +165,7 @@ fsirand(char *device)
if (!printonly) {
/* Randomize fs_id and write out new sblock and backups */
sblock->fs_id[0] = (u_int32_t)time(NULL);
- sblock->fs_id[1] = random();
+ sblock->fs_id[1] = arc4random();
if (sbput(devfd, sblock, sblock->fs_ncg) != 0) {
warn("could not write updated superblock");
return (1);