On 31.01.2013 13:24, Andrey Borzenkov wrote: > Fix autodetection of $prefix when booted from EFI CD-ROM. > > Based on patch from Matthew Garrett, modified to not overwrite > memory returned by device path protocol handler and rebased to > current trunk. > > Additionally fixes potential memory leak - dup_dp was not deallocated > if device path was not found.
Why any special treatement for CD-ROMs? They can have partitions and do so on CD-ROMs intended for macs. What about following patch: phcoder@debian.x201.phnet:15:02:18:~/grub2/bzr/mainline$ bzr diff === modified file 'grub-core/disk/efi/efidisk.c' --- grub-core/disk/efi/efidisk.c 2013-04-05 08:59:26 +0000 +++ grub-core/disk/efi/efidisk.c 2013-04-05 13:07:39 +0000 @@ -633,9 +633,6 @@ return d->handle; case 'c': - /* FIXME: probably this is not correct. */ - return d->handle; - case 'h': /* If this is the whole disk, just return its own data. */ if (! disk->partition) @@ -657,7 +654,9 @@ if ((GRUB_EFI_DEVICE_PATH_TYPE (c->last_device_path) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE) && (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path) - == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE) + == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE + || GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path) + == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE) && (grub_partition_get_start (disk->partition) == (hd.partition_start << (disk->log_sector_size - GRUB_DISK_SECTOR_BITS))) @@ -770,7 +769,9 @@ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) == GRUB_EFI_MEDIA_DEVICE_PATH_TYPE && (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) - == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)) + == GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE + || GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) + == GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE)) { struct grub_efidisk_get_device_name_ctx ctx; char *dev_name;
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel