the offset of an extended sub-partition is the offset of the top-level
extended partition, not the partition before it (this is annoying, and
makes `clean' recursive mbr descent difficult). fixes PRs 11829 and 12677.
effectively an MBR with it's own partition table which contains another
4 `slots', each of which can be another extended partition...
This involved reworking some of the internal functions.
* Use off_t appropriately (so we can manipulate sectors past 4GB).
* Tweak to compile with WARNS=2
DIOCGDEFLABEL ioctl, then fall back onto the DIOCGDINFO ioctl
if that fails. This ensures that we will get the actual hardware
geometry info rather than any bogus info that might have been
previously written to the disk's label area.
Prevent buffer overflows when configuring boot selector.
Cycle through partitions when entering boot names.
Use '<UNUSED>' consistently.
Reviewed by: fvdl
older CHS interface. This works around stupid BIOSs who report that
int13 extensions are present and functional, but fail when you actually
use them. Like Adaptec SCSI BIOSs.
For the bootselector, there was no space to get the CHS info from
the BIOS. Instead, use a flag that can be set by fdisk. fdisk will
set it if one of the partitions on the disk is out of CHS reach
for this disk/BIOS, so that the bootselector will use int13 extensions.
This isn't so bad, because it needs to be configured via fdisk anyway.
Change the mbr manualpage to reflect some shorter error messages.
effect (i386 only of course). Also change one branch in the
bootselector code to an explicit 16 bit one, and check both
the boot menu and partition tables to see if the partition
requested by the user should be booted. This check just in case,
should the bootselector menu and partition table get out of sync
somehow. (mmm, bytesqueezing)