svn commit: r257348 - head/sbin/newfs

Xin LI delphij at FreeBSD.org
Tue Oct 29 17:34:16 UTC 2013


Author: delphij
Date: Tue Oct 29 17:34:15 2013
New Revision: 257348
URL: http://svnweb.freebsd.org/changeset/base/257348

Log:
  Don't call arc4random_stir() explicitly.  To quote arc4random(3)
  manual page:
  
      There is no need to call arc4random_stir() before using
      arc4random() functions family, since they automatically
      initialize themselves.
  
  No objection:	des
  MFC after:	2 weeks

Modified:
  head/sbin/newfs/mkfs.c

Modified: head/sbin/newfs/mkfs.c
==============================================================================
--- head/sbin/newfs/mkfs.c	Tue Oct 29 17:31:16 2013	(r257347)
+++ head/sbin/newfs/mkfs.c	Tue Oct 29 17:34:15 2013	(r257348)
@@ -134,12 +134,10 @@ mkfs(struct partition *pp, char *fsys)
 	 */
 	disk.d_bsize = sectorsize;
 	disk.d_ufs = Oflag;
-	if (Rflag) {
+	if (Rflag)
 		utime = 1000000000;
-	} else {
+	else
 		time(&utime);
-		arc4random_stir();
-	}
 	sblock.fs_old_flags = FS_FLAGS_UPDATED;
 	sblock.fs_flags = 0;
 	if (Uflag)


More information about the svn-src-head mailing list