From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UO6sJ-00050H-0f for mharc-grub-devel@gnu.org; Fri, 05 Apr 2013 09:40:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52844) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO6sE-0004zH-Jq for grub-devel@gnu.org; Fri, 05 Apr 2013 09:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO6s6-0004iK-Fn for grub-devel@gnu.org; Fri, 05 Apr 2013 09:40:10 -0400 Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]:62691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO6s4-0004cD-T5 for grub-devel@gnu.org; Fri, 05 Apr 2013 09:40:02 -0400 Received: by mail-ea0-f181.google.com with SMTP id z10so1404779ead.40 for ; Fri, 05 Apr 2013 06:40:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=7E7ZnqtzzbFS/0viV7uUeHQBEL/EvexQgBA9rFk6SY4=; b=A0iP/OBnPPeigLP+UAoeqBAlgcQCRlDlu93Sgk/kvd8CNhavl6Yf6T27ClgAB5MOnD 1aXXzXSNQr+njd5o7DrTa1CJU+KGLXiNb9L8jsgh+/oCemK+zIYzn45q6FuXRKnJYdiv i/tbxZWrDloTgQrg6vQA5SNh/Jio3puyd2XCt0FLE7mgM6WcvQPIE1ZlLLYsSaXmx3jA nZwINTkFfZ4GoBz8PXLbNZLwChecwwDEQg4QqNhz2HJms3dOE8aIt9YeqYwxjxPVuIBA nAPNYyIab0JTIxZ0LwAE2Q/i2UyoRg3yYi+d3yJftPgQI6yTH38B3BOB7btZGwbFOkHO DmEA== X-Received: by 10.14.223.69 with SMTP id u45mr19707000eep.23.1365169200029; Fri, 05 Apr 2013 06:40:00 -0700 (PDT) Received: from debian.x201.phnet (35-233.197-178.cust.bluewin.ch. [178.197.233.35]) by mx.google.com with ESMTPS id ca4sm15498862eeb.15.2013.04.05.06.39.52 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Apr 2013 06:39:58 -0700 (PDT) Message-ID: <515ECDBA.40507@gmail.com> Date: Fri, 05 Apr 2013 15:12:26 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Fix prefix autodetection when booting from EFI CD-ROM References: <1359635040-23786-1-git-send-email-arvidjaar@gmail.com> In-Reply-To: <1359635040-23786-1-git-send-email-arvidjaar@gmail.com> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig44E8F1E5A9CB0737BA64FBEE" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::235 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 13:40:13 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig44E8F1E5A9CB0737BA64FBEE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 31.01.2013 13:24, Andrey Borzenkov wrote: > Fix autodetection of $prefix when booted from EFI CD-ROM. >=20 > Based on patch from Matthew Garrett, modified to not overwrite > memory returned by device path protocol handler and rebased to > current trunk. >=20 > 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 =3D=3D=3D 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) =3D=3D GRUB_EFI_MEDIA_DEVICE_PATH_TYPE) && (GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path) - =3D=3D GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE) + =3D=3D GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE + || GRUB_EFI_DEVICE_PATH_SUBTYPE (c->last_device_path) + =3D=3D GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE) && (grub_partition_get_start (disk->partition) =3D=3D (hd.partition_start << (disk->log_sector_size - GRUB_DISK_SECTOR_BITS))) @@ -770,7 +769,9 @@ if (GRUB_EFI_DEVICE_PATH_TYPE (ldp) =3D=3D GRUB_EFI_MEDIA_DEVICE_PATH_= TYPE && (GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) - =3D=3D GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE)) + =3D=3D GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE + || GRUB_EFI_DEVICE_PATH_SUBTYPE (ldp) + =3D=3D GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE)) { struct grub_efidisk_get_device_name_ctx ctx; char *dev_name; --------------enig44E8F1E5A9CB0737BA64FBEE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlFezboACgkQNak7dOguQgkXtwD/RwD19sgBnrREdmYwKk327KRa euvtow3yhq9QlTZ7h1EA/2CbIVLHLcTeAxfNdqjzDgPNDQp6puqnoJaTTU/oqT4I =oTaM -----END PGP SIGNATURE----- --------------enig44E8F1E5A9CB0737BA64FBEE--