]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/grub-0.94-i2o.patch
Samba-Update von Maniac...
[people/pmueller/ipfire-2.x.git] / src / patches / grub-0.94-i2o.patch
CommitLineData
cd1a2927
MT
1Only in grub-0.94/docs: grub.info
2Only in grub-0.94/docs: multiboot.info
3diff -ur grub-0.94/lib/device.c grub-0.94.new/lib/device.c
4--- grub-0.94/lib/device.c 2004-05-07 04:50:36.375238696 +0200
5+++ grub-0.94.new/lib/device.c 2004-05-07 04:48:57.611253104 +0200
6@@ -419,6 +419,12 @@
7 {
8 sprintf (name, "/dev/rd/c%dd%d", controller, drive);
9 }
10+
11+static void
12+get_i2o_disk_name (char *name, int unit)
13+{
14+ sprintf (name, "/dev/i2o/hd%c", unit + 'a');
15+}
16 #endif
17
18 /* Check if DEVICE can be read. If an error occurs, return zero,
19@@ -789,6 +795,26 @@
20 }
21 }
22 }
23+
24+ /* I2O disks. */
25+ for (i = 0; i < 8; i++)
26+ {
27+ char name[16];
28+
29+ get_i2o_disk_name (name, i);
30+ if (check_device (name))
31+ {
32+ (*map)[num_hd + 0x80] = strdup (name);
33+ assert ((*map)[num_hd + 0x80]);
34+
35+ /* If the device map file is opened, write the map. */
36+ if (fp)
37+ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
38+
39+ num_hd++;
40+ }
41+ }
42+
43 #endif /* __linux__ */
44
45 /* OK, close the device map file if opened. */
46@@ -844,7 +870,8 @@
47 (strncmp(dev, "/dev/ida/", 9) == 0 ||
48 strncmp(dev, "/dev/ataraid/", 13) == 0 ||
49 strncmp(dev, "/dev/cciss/", 11) == 0 ||
50- strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
51+ strncmp(dev, "/dev/rd/", 8) == 0 ||
52+ strncmp(dev, "/dev/i2o/", 9) == 0) ? "p" : "",
53 ((partition >> 16) & 0xFF) + 1);
54
55 /* Open the partition. */