File disk-by-ID of Package trustedgrub

diff -Burbp grub-0.97.orig/lib/device.c grub-0.97/lib/device.c
--- grub-0.97.orig/lib/device.c	2007-03-16 14:15:52.000000000 +0100
+++ grub-0.97/lib/device.c	2007-03-16 17:19:59.000000000 +0100
@@ -869,7 +869,15 @@ write_to_partition (char **map, int driv
 
   len = strlen(dev);
   pnum = ((partition >> 16) & 0xFF);
-  if (isdigit(dev[len-1]))
+  if (strncmp (dev, "/dev/disk/by-", 13) == 0)
+    {
+      sprintf (dev + len, "-part%d",  pnum + 1);
+    }
+  else if (strncmp (dev, "/dev/mapper/", 12) == 0)
+    {
+      sprintf (dev + len, "_part%d",  pnum + 1);
+    }
+  else if (isdigit(dev[len-1]) || strncmp (dev, "/dev/i2o/", 9) == 0)
     {
       /* It is obviously some RAID disk: "/dev/<dsk>/c0d0" . "p1" */
       sprintf (dev + len, "p%d",  pnum + 1);