From b89d7d0503308ac438a92a8ce12f49b278350266 Mon Sep 17 00:00:00 2001 From: natano Date: Tue, 8 Nov 2016 19:38:57 +0000 Subject: Respect -Ooffset for the disklabel location. --- usr.sbin/makefs/ffs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/makefs') diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 9206814128b..fdba04ff06a 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs.c,v 1.21 2016/11/08 19:22:29 natano Exp $ */ +/* $OpenBSD: ffs.c,v 1.22 2016/11/08 19:38:57 natano Exp $ */ /* $NetBSD: ffs.c,v 1.66 2015/12/21 00:58:08 christos Exp $ */ /* @@ -293,7 +293,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), - DOS_LABELSECTOR * DEV_BSIZE); + fsopts->offset + DOS_LABELSECTOR * DEV_BSIZE); if (n == -1) err(1, "failed to write disklabel"); else if (n < sizeof(struct disklabel)) -- cgit v1.2.3-59-g8ed1b