Date: Sat, 29 Mar 2014 04:05:57 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r263898 - user/marcel/mkimg Message-ID: <201403290405.s2T45vOE054788@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Sat Mar 29 04:05:57 2014 New Revision: 263898 URL: http://svnweb.freebsd.org/changeset/base/263898 Log: Build this on sparc64, where we don't have LABELSECTOR nor LABELOFFSET defined. Improve portability by eliminating their use. Modified: user/marcel/mkimg/bsd.c Modified: user/marcel/mkimg/bsd.c ============================================================================== --- user/marcel/mkimg/bsd.c Sat Mar 29 03:55:58 2014 (r263897) +++ user/marcel/mkimg/bsd.c Sat Mar 29 04:05:57 2014 (r263898) @@ -71,14 +71,14 @@ bsd_write(int fd, lba_t imgsz, void *boo 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403290405.s2T45vOE054788>