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.




_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to