~vcs-imports/ipfire/ipfire-2.x

« back to all changes in this revision

Viewing changes to src/patches/grub-0.93-special-device-names.patch

  • Committer: Daniel Glanzmann
  • Date: 2008-09-26 17:05:28 UTC
  • mto: (1394.1.12)
  • mto: This revision was merged to the branch mainline in revision 1401.
  • Revision ID: git-v1:19ac4d1b6e234e1391b3d406381e3b74e92c40dd
added new useragent thunderbird

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- grub-0.93/lib/device.c.raid 2002-05-20 05:53:46.000000000 -0400
 
2
+++ grub-0.93/lib/device.c      2002-12-28 23:24:10.000000000 -0500
 
3
@@ -689,7 +689,14 @@
 
4
       if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
 
5
        strcpy (dev + strlen(dev) - 5, "/part");
 
6
     }
 
7
-  sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
 
8
+
 
9
+  sprintf (dev + strlen(dev), "%s%d", 
 
10
+          /* Compaq smart and others */
 
11
+          (strncmp(dev, "/dev/ida/", 9) == 0 ||
 
12
+           strncmp(dev, "/dev/ataraid/", 13) == 0 ||
 
13
+           strncmp(dev, "/dev/cciss/", 11) == 0 ||
 
14
+           strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
 
15
+          ((partition >> 16) & 0xFF) + 1);
 
16
   
 
17
   /* Open the partition.  */
 
18
   fd = open (dev, O_RDWR);