Date: Tue, 29 Oct 2013 17:34:16 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257348 - head/sbin/newfs Message-ID: <201310291734.r9THYGoF061872@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310291734.r9THYGoF061872>