diff options
author | marcel <marcel@FreeBSD.org> | 2014-03-29 04:05:57 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2014-03-29 04:05:57 +0000 |
commit | 30dea1dbd2af13c6bf6397dd72d23a7efce2754a (patch) | |
tree | da6ce0220a54cb691a08e2f0207d168992a0470c | |
parent | f017f60135463f7ec96f7ec33488fa034a511996 (diff) | |
download | FreeBSD-src-30dea1dbd2af13c6bf6397dd72d23a7efce2754a.zip FreeBSD-src-30dea1dbd2af13c6bf6397dd72d23a7efce2754a.tar.gz |
Build this on sparc64, where we don't have LABELSECTOR nor LABELOFFSET
defined. Improve portability by eliminating their use.
-rw-r--r-- | bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -71,14 +71,14 @@ bsd_write(int fd, lba_t imgsz, void *bootcode) return (ENOMEM); if (bootcode != NULL) { memcpy(buf, bootcode, BBSIZE); - memset(buf + LABELSECTOR * secsz, 0, secsz); + memset(buf + secsz, 0, secsz); } else memset(buf, 0, BBSIZE); imgsz = ncyls * nheads * nsecs; ftruncate(fd, imgsz * secsz); - d = (void *)(buf + LABELSECTOR * secsz + LABELOFFSET); + d = (void *)(buf + secsz); le32enc(&d->d_magic, DISKMAGIC); le32enc(&d->d_secsize, secsz); le32enc(&d->d_nsectors, nsecs); |