All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45889)
Date: Fri, 11 Sep 2015 17:11:37 +0300	[thread overview]
Message-ID: <55F2E119.8020302@gmail.com> (raw)
In-Reply-To: <fb1060aac2973a78f86dd4a39b1707d1@iam.tj>

09.09.2015 04:18, TJ пишет:
> On 08-09-2015 17:38, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>> On 06.09.2015 21:10, TJ wrote:
>>> https://savannah.gnu.org/bugs/index.php?45889
>>> +      if ((disk->partition && disk->partition->number ==
>>> dev->partition_number) ||
>>> +          (!disk->partition && dev->partition_number == 0))
>>> +        return dev;
>> Please store and compare partition start, not parition number as the
>> same partition can be available several times through different partiton
>> schemes under different numbers. Additionally this allows to use
>> get_partition_start which already has the logic of handling empty
>> partitions
>
> Done and tested. Works perfectly.
>

Well, should not it also compare disk sizes (grub_disk_get_size)? Also 
grub_partition_get_start cannot differentiate between full disk (start 
== 0) and partition that starts at offset 0.





  reply	other threads:[~2015-09-11 14:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07  4:10 cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45889) TJ
2015-09-08 16:38 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-09-09  1:18   ` TJ
2015-09-11 14:11     ` Andrei Borzenkov [this message]
2015-09-11 14:54       ` TJ
2015-11-07 15:54         ` Andrei Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F2E119.8020302@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.