grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45


From: Andrei Borzenkov
Subject: Re: cryptodisk: teach grub_cryptodisk_insert() about partitions (bug #45889)
Date: Fri, 11 Sep 2015 17:11:37 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

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 via email to

[Prev in Thread] Current Thread [Next in Thread]