windows: correct LBA in generated EFI HDD media paths

GRUB keeps partition offset and size in units of 512B sectors. Media paths
are defined in terms of LBA which are presumed to match HDD sector size.

This is probably cosmetic (EFI requires that partition is searched by GUID)
and still incorrect if GPT was created using different logical block size.
But current code is obviously wrong and new has better chances to be correct.
This commit is contained in:
Andrei Borzenkov 2015-12-19 11:32:26 +03:00
parent c79c59f129
commit a9399f2e1e

View file

@ -370,9 +370,9 @@ grub_install_register_efi (grub_device_t efidir_grub_dev,
} }
hddp->partition_start = grub_partition_get_start (efidir_grub_dev->disk->partition) hddp->partition_start = grub_partition_get_start (efidir_grub_dev->disk->partition)
<< (efidir_grub_dev->disk->log_sector_size - GRUB_DISK_SECTOR_BITS); >> (efidir_grub_dev->disk->log_sector_size - GRUB_DISK_SECTOR_BITS);
hddp->partition_size = grub_disk_get_size (efidir_grub_dev->disk) hddp->partition_size = grub_disk_get_size (efidir_grub_dev->disk)
<< (efidir_grub_dev->disk->log_sector_size - GRUB_DISK_SECTOR_BITS); >> (efidir_grub_dev->disk->log_sector_size - GRUB_DISK_SECTOR_BITS);
pathptr = hddp + 1; pathptr = hddp + 1;
filep = pathptr; filep = pathptr;