]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle
authorColin Watson <cjwatson@ubuntu.com>
Fri, 27 May 2011 12:57:22 +0000 (13:57 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 27 May 2011 12:57:22 +0000 (13:57 +0100)
partitions under /dev/disk/by-id/.

ChangeLog
grub-core/kern/emu/hostdisk.c

index 351700803da0db23eef32b8742763783147cc94b..b9abcd07f3730f66bf441a691e9206a22dc2281e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-05-27  Colin Watson  <cjwatson@ubuntu.com>
+
+       * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle
+       partitions under /dev/disk/by-id/.
+
 2011-05-27  Colin Watson  <cjwatson@ubuntu.com>
 
        * grub-core/kern/emu/hostdisk.c (linux_find_partition): Give up
index e404c4fea565934c032475c6c185a81f70e42373..bb528d9bcc31065a38a97ed050f2b0b7451e7971 100644 (file)
@@ -573,6 +573,12 @@ linux_find_partition (char *dev, grub_disk_addr_t sector)
       p = real_dev + len - 4;
       format = "part%d";
     }
+  else if (strncmp (real_dev, "/dev/disk/by-id/",
+                   sizeof ("/dev/disk/by-id/") - 1) == 0)
+    {
+      p = real_dev + len;
+      format = "-part%d";
+    }
   else if (real_dev[len - 1] >= '0' && real_dev[len - 1] <= '9')
     {
       p = real_dev + len;