summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2014-03-27 21:32:02 +0000
committermarcel <marcel@FreeBSD.org>2014-03-27 21:32:02 +0000
commita349124060124182fd42cb1d2aa4dacaddd11757 (patch)
treed1a09ecf65c0162ec236322b7d7c2e9ad5cb6ce8
parent6084642f6d5685bfa794ae063e8b924555e68559 (diff)
downloadFreeBSD-src-a349124060124182fd42cb1d2aa4dacaddd11757.zip
FreeBSD-src-a349124060124182fd42cb1d2aa4dacaddd11757.tar.gz
Fix writing the start and size fields.
-rw-r--r--mbr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbr.c b/mbr.c
index 26c8ec1..131dc11 100644
--- a/mbr.c
+++ b/mbr.c
@@ -89,8 +89,8 @@ mbr_write(int fd, lba_t imgsz __unused, void *bootcode)
dp->dp_typ = ALIAS_TYPE2INT(part->type);
mbr_chs(&dp->dp_ecyl, &dp->dp_ehd, &dp->dp_esect,
part->block + part->size - 1);
- le32enc(&dp[part->index].dp_start, part->block);
- le32enc(&dp[part->index].dp_size, part->size);
+ le32enc(&dp->dp_start, part->block);
+ le32enc(&dp->dp_size, part->size);
}
error = mkimg_seek(fd, 0);
if (error == 0) {
OpenPOWER on IntegriCloud