summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2017-01-21 21:58:32 +0000
committernatano <natano@openbsd.org>2017-01-21 21:58:32 +0000
commit8a42a32ccf855c5be9f80b169447aef09baeb8ba (patch)
treed24e0c61ed94b619bcb921f23343ed8eec75d94b /usr.sbin/makefs
parenttweak previous; (diff)
downloadwireguard-openbsd-8a42a32ccf855c5be9f80b169447aef09baeb8ba.tar.xz
wireguard-openbsd-8a42a32ccf855c5be9f80b169447aef09baeb8ba.zip
Use MD disklabel position.
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/ffs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c
index 87f97ee09e7..9bd90e67789 100644
--- a/usr.sbin/makefs/ffs.c
+++ b/usr.sbin/makefs/ffs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs.c,v 1.30 2016/12/17 16:14:18 krw Exp $ */
+/* $OpenBSD: ffs.c,v 1.31 2017/01/21 21:58:32 natano Exp $ */
/* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */
/*
@@ -277,7 +277,7 @@ ffs_makefs(const char *image, const char *dir, fsnode *root, fsinfo_t *fsopts)
lp->d_checksum = sum;
n = pwrite(fsopts->fd, lp, sizeof(struct disklabel),
- fsopts->offset + DOS_LABELSECTOR * DEV_BSIZE);
+ fsopts->offset + LABELSECTOR * DEV_BSIZE + LABELOFFSET);
if (n == -1)
err(1, "failed to write disklabel");
else if (n < sizeof(struct disklabel))