From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UNogc-0004wz-MC for mharc-grub-devel@gnu.org; Thu, 04 Apr 2013 14:14:58 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNogU-0004vg-0d for grub-devel@gnu.org; Thu, 04 Apr 2013 14:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNogP-0001U1-0l for grub-devel@gnu.org; Thu, 04 Apr 2013 14:14:49 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:51238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNogO-0001Th-PF for grub-devel@gnu.org; Thu, 04 Apr 2013 14:14:44 -0400 Received: by mail-lb0-f172.google.com with SMTP id u10so3030159lbi.17 for ; Thu, 04 Apr 2013 11:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:in-reply-to:references :x-mailer:mime-version:content-type:content-transfer-encoding; bh=R9S33tF6pn0fvjNWlMPFRytSPQkPifOzbcreYwMRfRg=; b=hNiyOp+35ZAyQt6FYuvWZCf8ERTTbnoEY2gDJ2W6ralCMKJMjqryOrWVmqmtbWT7/6 GdR0h9Sv+G9atIwq9NfSznpOFbrQjNuvAfXGq9UYBzU+6KixWNCqiYxes/CkQwZYlmFS qVrWfmFHY+sJrmg2nJeXP01wt/UNj3stNnNtmkdz+VroZ4z2yDrmDbD3UFKQ6fawQFh8 SgeJmVjxyHRChgAF4xtmmiAVQyTX9dFHvGZJg/+SzsYrBrDtLQNc7YeZpF8qQCcdAMd4 2AHRWpGUPyxfsYRwf5HMLPTrwzvsEntZUVB8/JOTusZNiQAybSoZ7LlJMAXppEBCgCgV OvlQ== X-Received: by 10.112.76.39 with SMTP id h7mr2792734lbw.118.1365099283721; Thu, 04 Apr 2013 11:14:43 -0700 (PDT) Received: from opensuse.site ([94.29.72.160]) by mx.google.com with ESMTPS id h5sm1362171lbw.7.2013.04.04.11.14.42 (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 04 Apr 2013 11:14:42 -0700 (PDT) Date: Thu, 4 Apr 2013 22:14:41 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [PATCH] Make grub_efidisk_get_device_name() work on 4K native disks. Message-ID: <20130404221441.452eb3b8@opensuse.site> In-Reply-To: <20130404174117.GC1202@fenchurch.internal.datastacks.com> References: <1365004386-24760-1-git-send-email-pjones@redhat.com> <20130403230346.01b981c2@opensuse.site> <20130404174117.GC1202@fenchurch.internal.datastacks.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.14; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.172 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 18:14:56 -0000 В Thu, 4 Apr 2013 13:52:05 -0400 Peter Jones пишет: > On Wed, Apr 03, 2013 at 11:03:46PM +0400, Andrey Borzenkov wrote: > > В Wed, 3 Apr 2013 11:53:06 -0400 > > Peter Jones пишет: > > > > > 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 need > > > to compensate. > > > > > > Signed-off-by: Peter Jones > > > --- > > > grub-core/disk/efi/efidisk.c | 10 ++++++---- > > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > > > diff --git a/grub-core/disk/efi/efidisk.c b/grub-core/disk/efi/efidisk.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_partition_t part); > > > > > > > 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 looks > like it already takes this in to consideration. > Hmm ... I do not see it. Your change looks still necessary. > So nevermind then :) > > Thanks for having a look.