Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2014 21:32:02 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r263841 - user/marcel/mkimg
Message-ID:  <201403272132.s2RLW2WJ092635@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Thu Mar 27 21:32:02 2014
New Revision: 263841
URL: http://svnweb.freebsd.org/changeset/base/263841

Log:
  Fix writing the start and size fields.

Modified:
  user/marcel/mkimg/mbr.c

Modified: user/marcel/mkimg/mbr.c
==============================================================================
--- user/marcel/mkimg/mbr.c	Thu Mar 27 21:19:05 2014	(r263840)
+++ user/marcel/mkimg/mbr.c	Thu Mar 27 21:32:02 2014	(r263841)
@@ -89,8 +89,8 @@ mbr_write(int fd, lba_t imgsz __unused, 
 		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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403272132.s2RLW2WJ092635>