]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
Be compatible with boot code that starts right after the disk label in
authormarcel <marcel@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 18 Sep 2014 22:27:02 +0000 (22:27 +0000)
committermarcel <marcel@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 18 Sep 2014 22:27:02 +0000 (22:27 +0000)
commit014e23cf4566e33060638dda59fb5a10fe2d6743
tree000a6cb57fe12703828f1591006bf0f69751aa43
parent4fb378497bd323a91b7062466cdd6ba645527b2f
Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
 after the disklabel in the 2nd sector for boot code.

Obtained from: Juniper Networks, Inc.

Approved by: re@ (gjb)

git-svn-id: svn://svn.freebsd.org/base/stable/10@271846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/mkimg/bsd.c