[core] try not to clear MBR/GPT sectors higher than the lowest partition

* This ensures that a drive can be reformatted without error after writing
  an image such as super_grub2_disk_x86_64_efi_2.02s4.iso
This commit is contained in:
Pete Batard 2016-07-07 18:13:01 +01:00
parent 2f88286dc1
commit 91eec034b1
4 changed files with 29 additions and 17 deletions

View file

@ -61,7 +61,7 @@ typedef struct {
DWORD DeviceNumber;
DWORD SectorsPerTrack;
DWORD SectorSize;
DWORD FirstSector;
DWORD FirstDataSector;
MEDIA_TYPE MediaType;
int PartitionType;
int nPartitions; // number of partitions we actually care about