Steffen Winterfeldt changed bug 911584
What Removed Added
CC   mchang@suse.com
Flags   needinfo?(mchang@suse.com)

Comment # 1 on bug 911584 from
Good point. Michael, as the code was from you, the assumption

https://github.com/openSUSE/perl-bootloader/blob/master/src/Core/GRUB2.pm#L130

is not safe. Looking at the sysfs tree like

--- a/src/Core/GRUB2.pm
+++ b/src/Core/GRUB2.pm
@@ -127,7 +127,9 @@ sub GetDeviceMap {
         }

         # skip partitions, assume they were ended with digits
-        if ($kern_dev =~ /\d+$/) {
+        my $sys_dev = $kern_dev;
+        $sys_dev =~ s#/#!#;
+        if (!-d "/sys/block/$sys_dev") {
             $self->milestone ("skip partition $kern_dev in device map");
             next GETMAP;
         }

might work better.

But I'm not at home with the grub2 device map code. :-)


You are receiving this mail because: