From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UNoKm-00041K-HA for mharc-grub-devel@gnu.org; Thu, 04 Apr 2013 13:52:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNoKg-00040f-Ee for grub-devel@gnu.org; Thu, 04 Apr 2013 13:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNoKZ-00016G-9o for grub-devel@gnu.org; Thu, 04 Apr 2013 13:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5440) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNoKZ-00015v-24 for grub-devel@gnu.org; Thu, 04 Apr 2013 13:52:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r34Hq9aJ018984 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Apr 2013 13:52:09 -0400 Received: from fenchurch.internal.datastacks.com ([10.3.113.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r34Hq6g1030119 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 4 Apr 2013 13:52:08 -0400 Date: Thu, 4 Apr 2013 13:52:05 -0400 From: Peter Jones To: The development of GNU GRUB Subject: Re: [PATCH] Make grub_efidisk_get_device_name() work on 4K native disks. Message-ID: <20130404174117.GC1202@fenchurch.internal.datastacks.com> References: <1365004386-24760-1-git-send-email-pjones@redhat.com> <20130403230346.01b981c2@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20130403230346.01b981c2@opensuse.site> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id r34Hq9aJ018984 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 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: Thu, 04 Apr 2013 17:52:23 -0000 On Wed, Apr 03, 2013 at 11:03:46PM +0400, Andrey Borzenkov wrote: > =D0=92 Wed, 3 Apr 2013 11:53:06 -0400 > Peter Jones =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >=20 > > When we have 4kB sectors instead of 512b sectors, hd.partition_start = and > > grub_partition_get_start() won't match - the latter assumes 512-byte > > sectors, and the former gives us the correct number based on the > > physical media's sector size. So when we have to compare them, we ne= ed > > to compensate. > >=20 > > Signed-off-by: Peter Jones > > --- > > grub-core/disk/efi/efidisk.c | 10 ++++++---- > > 1 file changed, 6 insertions(+), 4 deletions(-) > >=20 > > diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidis= k.c > > index 77ab5b0..a905b52 100644 > > --- a/grub-core/disk/efi/efidisk.c > > +++ b/grub-core/disk/efi/efidisk.c > > @@ -791,11 +791,13 @@ grub_efidisk_get_device_name (grub_efi_handle_t= *handle) > > auto int find_partition (grub_disk_t disk, const grub_partitio= n_t part); > > =20 >=20 > You need to rebase to current trunk which does not use nested functions > anymore. Also in current trunk there is second use of > grub_partition_get_start() which looks like it has the same issue. Oh, indeed, you're right, that has changed. Although the current tree lo= oks like it already takes this in to consideration. So nevermind then :) Thanks for having a look. --=20 Peter