diff options
author | Martin Natano <natano@cvs.openbsd.org> | 2016-11-08 19:38:58 +0000 |
---|---|---|
committer | Martin Natano <natano@cvs.openbsd.org> | 2016-11-08 19:38:58 +0000 |
commit | 123235ee2127f8f803badf53a4c1ce066642f9c1 (patch) | |
tree | 8c41519ba3a0aa9a9a0b4ba531a53c751277fbf2 | |
parent | 4bb7e9c780dd874dbfcc0df1d09fb3474c51c3d2 (diff) |
Respect -Ooffset for the disklabel location.
-rw-r--r-- | usr.sbin/makefs/ffs.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)) |