Use arc4random() instead of random().

MFC after:	2 weeks
This commit is contained in:
Xin LI 2013-04-15 05:39:21 +00:00
parent 0772266e63
commit 44246b4c36
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=249500

View File

@ -141,14 +141,9 @@ growfs(int fsi, int fso, unsigned int Nflag)
uint cylno;
int i, j, width;
char tmpbuf[100];
static int randinit = 0;
DBG_ENTER;
if (!randinit) {
randinit = 1;
srandomdev();
}
time(&modtime);
/*
@ -407,7 +402,7 @@ initcg(int cylno, time_t modtime, int fso, unsigned int Nflag)
i += sblock.fs_frag) {
dp1 = (struct ufs1_dinode *)(void *)iobuf;
for (j = 0; j < INOPB(&sblock); j++) {
dp1->di_gen = random();
dp1->di_gen = arc4random();
dp1++;
}
wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i),