]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/grub-0.93-special-device-names.patch
git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848...
[people/pmueller/ipfire-2.x.git] / src / patches / grub-0.93-special-device-names.patch
diff --git a/src/patches/grub-0.93-special-device-names.patch b/src/patches/grub-0.93-special-device-names.patch
new file mode 100644 (file)
index 0000000..1323bb3
--- /dev/null
@@ -0,0 +1,18 @@
+--- grub-0.93/lib/device.c.raid        2002-05-20 05:53:46.000000000 -0400
++++ grub-0.93/lib/device.c     2002-12-28 23:24:10.000000000 -0500
+@@ -689,7 +689,14 @@
+       if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
+       strcpy (dev + strlen(dev) - 5, "/part");
+     }
+-  sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
++
++  sprintf (dev + strlen(dev), "%s%d", 
++         /* Compaq smart and others */
++         (strncmp(dev, "/dev/ida/", 9) == 0 ||
++            strncmp(dev, "/dev/ataraid/", 13) == 0 ||
++          strncmp(dev, "/dev/cciss/", 11) == 0 ||
++          strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
++         ((partition >> 16) & 0xFF) + 1);
+   
+   /* Open the partition.  */
+   fd = open (dev, O_RDWR);