1 diff -ru grub-0.96-orig/lib/device.c grub-0.96/lib/device.c
2 --- grub-0.96-orig/lib/device.c 2005-02-16 22:33:09.669384408 -0600
3 +++ grub-0.96/lib/device.c 2005-02-17 00:47:05.127596672 -0600
6 sprintf (name, "/dev/ataraid/d%c", unit + '0');
10 +get_i2o_disk_name (char *name, int unit)
12 + sprintf (name, "/dev/i2o/hd%c", unit + 'a');
16 /* Check if DEVICE can be read. If an error occurs, return zero,
23 + for (i = 0; i < 8; i++)
27 + get_i2o_disk_name (name, i);
28 + if (check_device (name))
30 + (*map)[num_hd + 0x80] = strdup (name);
31 + assert ((*map)[num_hd + 0x80]);
33 + /* If the device map file is opened, write the map. */
35 + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
41 #endif /* __linux__ */
43 /* OK, close the device map file if opened. */
45 if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
46 strcpy (dev + strlen(dev) - 5, "/part");
48 - sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
50 + sprintf (dev + strlen(dev), "%s%d",
51 + /* Compaq smart and others */
52 + (strncmp(dev, "/dev/ida/", 9) == 0 ||
53 + strncmp(dev, "/dev/ataraid/", 13) == 0 ||
54 + strncmp(dev, "/dev/cciss/", 11) == 0 ||
55 + strncmp(dev, "/dev/rd/", 8) == 0 ||
56 + strncmp(dev, "/dev/i2o/", 9) == 0) ? "p" : "",
57 + ((partition >> 16) & 0xFF) + 1);
59 /* Open the partition. */
60 fd = open (dev, O_RDWR);