freebsd-dev/usr.bin/mkimg
Marcel Moolenaar de3307644e 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.
MFC after:	3 days
2014-09-12 04:15:35 +00:00
..
apm.c Make this compile on older FreeBSD versions that don't have 2014-07-11 01:49:25 +00:00
bsd.c Be compatible with boot code that starts right after the disk label in 2014-09-12 04:15:35 +00:00
ebr.c MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
format.c MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
format.h MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
gpt.c Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V 2014-07-03 20:31:43 +00:00
image.c Add image_data() for checking whether a sequence of blocks has data. 2014-07-15 04:39:23 +00:00
image.h Add image_data() for checking whether a sequence of blocks has data. 2014-07-15 04:39:23 +00:00
Makefile Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V 2014-07-03 20:31:43 +00:00
mbr.c MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
mkimg.1 Document the -y option as a unit test option. 2014-07-04 18:47:25 +00:00
mkimg.c Document the -y option as a unit test option. 2014-07-04 18:47:25 +00:00
mkimg.h Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V 2014-07-03 20:31:43 +00:00
pc98.c MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
raw.c Add VHD support to mkimg(1). VHD is used by Xen and Microsoft's Hyper-V 2014-07-03 20:31:43 +00:00
scheme.c Fix CID 1215125: fstat(2) returns -1 on error and sets errno. It does 2014-05-21 17:37:22 +00:00
scheme.h MFuser/marcel/mkimg: 2014-05-15 19:19:57 +00:00
vhd.c Fix builds on older FreeBSD versions and/or non-FreeBSD machines: 2014-07-23 18:05:39 +00:00
vmdk.c Create a redundant grain directory and table. Previously we were 2014-08-09 04:47:12 +00:00
vtoc8.c Fix CID 1204379 (vtoc8.c) & CID 1204380 (bsd.c): Cast ncyls to lba_t 2014-05-21 17:39:49 +00:00