From: Colin Watson Date: Fri, 27 May 2011 12:57:22 +0000 (+0100) Subject: * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle X-Git-Tag: 2.00~1221 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b4e643081999c9fe388ad5bd8ad96812777fc76;p=thirdparty%2Fgrub.git * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle partitions under /dev/disk/by-id/. --- diff --git a/ChangeLog b/ChangeLog index 351700803..b9abcd07f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-27 Colin Watson + + * grub-core/kern/emu/hostdisk.c (linux_find_partition): Handle + partitions under /dev/disk/by-id/. + 2011-05-27 Colin Watson * grub-core/kern/emu/hostdisk.c (linux_find_partition): Give up diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index e404c4fea..bb528d9bc 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -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;