updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / grub-legacy-gfx / more-raid.patch
blob39db23474b9b24149ed53ba7fc353dfd2a49ea36
1 --- grub-0.95/lib/device.c.moreraid 2004-11-30 17:09:36.736099360 -0500
2 +++ grub-0.95/lib/device.c 2004-11-30 17:12:17.319686944 -0500
3 @@ -544,6 +544,17 @@
6 static void
7 +get_cciss_disk_name (char * name, int controller, int drive)
8 +{
9 + sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
12 +static void
13 +get_cpqarray_disk_name (char * name, int controller, int drive)
15 + sprintf (name, "/dev/ida/c%dd%d", controller, drive);
17 +static void
18 get_ataraid_disk_name (char *name, int unit)
20 sprintf (name, "/dev/ataraid/d%c", unit + '0');
21 @@ -920,7 +931,7 @@
23 for (controller = 0; controller < 8; controller++)
25 - for (drive = 0; drive < 15; drive++)
26 + for (drive = 0; drive < 32; drive++)
28 char name[24];
30 @@ -940,6 +951,70 @@
33 #endif /* __linux__ */
35 +#ifdef __linux__
36 + /* This is for cciss - we have
37 + /dev/cciss/c<controller>d<logical drive>p<partition>.
39 + cciss driver currently supports up to 8 controllers, 16 logical
40 + drives, and 7 partitions. */
41 + {
42 + int controller, drive;
44 + for (controller = 0; controller < 8; controller++)
45 + {
46 + for (drive = 0; drive < 16; drive++)
47 + {
48 + char name[24];
50 + get_cciss_disk_name (name, controller, drive);
51 + if (check_device (name))
52 + {
53 + (*map)[num_hd + 0x80] = strdup (name);
54 + assert ((*map)[num_hd + 0x80]);
56 + /* If the device map file is opened, write the map. */
57 + if (fp)
58 + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
60 + num_hd++;
61 + }
62 + }
63 + }
64 + }
65 +#endif /* __linux__ */
67 +#ifdef __linux__
68 + /* This is for cpqarray - we have
69 + /dev/ida/c<controller>d<logical drive>p<partition>.
71 + cpqarray driver currently supports up to 8 controllers, 16 logical
72 + drives, and 15 partitions. */
73 + {
74 + int controller, drive;
76 + for (controller = 0; controller < 8; controller++)
77 + {
78 + for (drive = 0; drive < 15; drive++)
79 + {
80 + char name[24];
82 + get_cpqarray_disk_name (name, controller, drive);
83 + if (check_device (name))
84 + {
85 + (*map)[num_hd + 0x80] = strdup (name);
86 + assert ((*map)[num_hd + 0x80]);
88 + /* If the device map file is opened, write the map. */
89 + if (fp)
90 + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
92 + num_hd++;
93 + }
94 + }
95 + }
96 + }
97 +#endif /* __linux__ */
99 /* OK, close the device map file if opened. */
100 if (fp)