summaryrefslogtreecommitdiffstats
path: root/sbin/newfs/mkfs.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-03-19 21:05:29 +0000
committerphk <phk@FreeBSD.org>2002-03-19 21:05:29 +0000
commitca2e5c188ee68045b54a86bfefcfd4a75e174221 (patch)
treeefe73699db1df391f9b4fcd88000d3a2f42d5ede /sbin/newfs/mkfs.c
parent5a84f9883932fbf90adb9dd3951956e85776adb9 (diff)
downloadFreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.zip
FreeBSD-src-ca2e5c188ee68045b54a86bfefcfd4a75e174221.tar.gz
Add the undocumented -R option to disable randomness for regression-testing.
Add a couple of simple regression tests accessible with "make test", they depend on the md(4) driver. FYI I have also tried running the test against a week old newfs and it passed.
Diffstat (limited to 'sbin/newfs/mkfs.c')
-rw-r--r--sbin/newfs/mkfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index d7fea21..e50aef8 100644
--- a/sbin/newfs/mkfs.c
+++ b/sbin/newfs/mkfs.c
@@ -123,8 +123,11 @@ mkfs(struct partition *pp, char *fsys, int fi, int fo)
int width;
char tmpbuf[100]; /* XXX this will break in about 2,500 years */
- time(&utime);
- if (!randinit) {
+ if (Rflag)
+ utime = 1000000000;
+ else
+ time(&utime);
+ if (!Rflag && !randinit) {
randinit = 1;
srandomdev();
}
OpenPOWER on IntegriCloud