summaryrefslogtreecommitdiffstats
path: root/sbin/growfs
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2013-09-05 20:18:59 +0000
committersjg <sjg@FreeBSD.org>2013-09-05 20:18:59 +0000
commit62bb1062226d3ce6a2350808256a25508978352d (patch)
tree22b131dceb13c3df96da594fbaadb693504797c7 /sbin/growfs
parent72ab90509b3a51ab361bf710338f2ef44a4e360d (diff)
parent04932445481c2cb89ff69a83b961bdef3d64757e (diff)
downloadFreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.zip
FreeBSD-src-62bb1062226d3ce6a2350808256a25508978352d.tar.gz
Merge from head
Diffstat (limited to 'sbin/growfs')
-rw-r--r--sbin/growfs/growfs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c
index 745e9e9..b8a81c2 100644
--- a/sbin/growfs/growfs.c
+++ b/sbin/growfs/growfs.c
@@ -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),
@@ -1549,7 +1544,7 @@ main(int argc, char **argv)
printf(" from %s to %s? [Yes/No] ", oldsizebuf, newsizebuf);
fflush(stdout);
fgets(reply, (int)sizeof(reply), stdin);
- if (strcmp(reply, "Yes\n")){
+ if (strcasecmp(reply, "Yes\n")){
printf("\nNothing done\n");
exit (0);
}
OpenPOWER on IntegriCloud