Module Name:    src
Committed By:   jmcneill
Date:           Sun Feb 10 16:56:01 UTC 2013

Modified Files:
        src/distrib/utils/embedded: mkimage

Log Message:
fix msdos mbr partition size calculation


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/distrib/utils/embedded/mkimage

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/embedded/mkimage
diff -u src/distrib/utils/embedded/mkimage:1.29 src/distrib/utils/embedded/mkimage:1.30
--- src/distrib/utils/embedded/mkimage:1.29	Sun Feb 10 16:13:23 2013
+++ src/distrib/utils/embedded/mkimage	Sun Feb 10 16:56:01 2013
@@ -1,5 +1,5 @@
 #!/bin/sh -x
-# $NetBSD: mkimage,v 1.29 2013/02/10 16:13:23 christos Exp $
+# $NetBSD: mkimage,v 1.30 2013/02/10 16:56:01 jmcneill Exp $
 #
 # Copyright (c) 2013 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -157,7 +157,9 @@ make_label > ${tmp}/label
 ${DISKLABEL} -R -F ${image} ${tmp}/label
 if [ -n ${msdosid} ]; then
 	echo ${bar} Running fdisk ${bar}
-	${FDISK} -f -u -0 -s ${msdosid}/${init}/${boot} -F ${image}
+	initsecs=$((${init} * 1024))
+	bootsecs=$((${boot} * 1024))
+	${FDISK} -f -u -0 -s ${msdosid}/${initsecs}/${bootsecs} -F ${image}
 fi
 
 if $compress; then

Reply via email to