summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2016-11-14 09:03:19 +0000
committernatano <natano@openbsd.org>2016-11-14 09:03:19 +0000
commit35e8d5674b5efeb36f85f19c97bb908bb637f7b7 (patch)
tree5c6c27b9cb7406568c2a8231255a9ff47113931c /usr.sbin/makefs
parentrnh_multipath can go, multipath support is dead. (diff)
downloadwireguard-openbsd-35e8d5674b5efeb36f85f19c97bb908bb637f7b7.tar.xz
wireguard-openbsd-35e8d5674b5efeb36f85f19c97bb908bb637f7b7.zip
disklabel -w doesn't set bstart/bend, so makefs shouldn't do that either.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/ffs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 0d6cbdf539a..e5686e2e6c3 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.c,v 1.27 2016/11/13 10:22:21 natano Exp $ */
+/* $OpenBSD: ffs.c,v 1.28 2016/11/14 09:03:19 natano Exp $ */
/* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */
/*
@@ -259,11 +259,6 @@ ffs_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
uint16_t *p, *end, sum = 0;
ssize_t n;
uint32_t bpg;
- int i;
-
- arc4random_buf(lp->d_uid, sizeof(lp->d_uid));
- DL_SETBSTART(lp, 0);
- DL_SETBEND(lp, DL_GETDSIZE(lp));
bpg = superblock->fs_fpg / superblock->fs_frag;
while (bpg > UINT16_MAX)
@@ -272,6 +267,7 @@ ffs_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
lp->d_magic = DISKMAGIC;
lp->d_magic2 = DISKMAGIC;
+ arc4random_buf(lp->d_uid, sizeof(lp->d_uid));
lp->d_checksum = 0;
p = (uint16_t *)lp;