Annotation of /trunk/grub/patches/grub-0.97-more-raid.patch
Parent Directory | Revision Log
Revision 1053 -
(hide annotations)
(download)
Fri Jun 25 10:52:50 2010 UTC (14 years, 3 months ago) by niro
File size: 2431 byte(s)
Fri Jun 25 10:52:50 2010 UTC (14 years, 3 months ago) by niro
File size: 2431 byte(s)
more patches and fixed ext4 patch
1 | niro | 1053 | --- 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 @@ | ||
4 | } | ||
5 | |||
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); | ||
10 | +} | ||
11 | + | ||
12 | +static void | ||
13 | +get_cpqarray_disk_name (char * name, int controller, int drive) | ||
14 | +{ | ||
15 | + sprintf (name, "/dev/ida/c%dd%d", controller, drive); | ||
16 | +} | ||
17 | +static void | ||
18 | get_ataraid_disk_name (char *name, int unit) | ||
19 | { | ||
20 | sprintf (name, "/dev/ataraid/d%c", unit + '0'); | ||
21 | @@ -920,7 +931,7 @@ | ||
22 | |||
23 | for (controller = 0; controller < 8; controller++) | ||
24 | { | ||
25 | - for (drive = 0; drive < 15; drive++) | ||
26 | + for (drive = 0; drive < 32; drive++) | ||
27 | { | ||
28 | char name[24]; | ||
29 | |||
30 | @@ -940,6 +951,70 @@ | ||
31 | } | ||
32 | } | ||
33 | #endif /* __linux__ */ | ||
34 | + | ||
35 | +#ifdef __linux__ | ||
36 | + /* This is for cciss - we have | ||
37 | + /dev/cciss/c<controller>d<logical drive>p<partition>. | ||
38 | + | ||
39 | + cciss driver currently supports up to 8 controllers, 16 logical | ||
40 | + drives, and 7 partitions. */ | ||
41 | + { | ||
42 | + int controller, drive; | ||
43 | + | ||
44 | + for (controller = 0; controller < 8; controller++) | ||
45 | + { | ||
46 | + for (drive = 0; drive < 16; drive++) | ||
47 | + { | ||
48 | + char name[24]; | ||
49 | + | ||
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]); | ||
55 | + | ||
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); | ||
59 | + | ||
60 | + num_hd++; | ||
61 | + } | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
65 | +#endif /* __linux__ */ | ||
66 | + | ||
67 | +#ifdef __linux__ | ||
68 | + /* This is for cpqarray - we have | ||
69 | + /dev/ida/c<controller>d<logical drive>p<partition>. | ||
70 | + | ||
71 | + cpqarray driver currently supports up to 8 controllers, 16 logical | ||
72 | + drives, and 15 partitions. */ | ||
73 | + { | ||
74 | + int controller, drive; | ||
75 | + | ||
76 | + for (controller = 0; controller < 8; controller++) | ||
77 | + { | ||
78 | + for (drive = 0; drive < 15; drive++) | ||
79 | + { | ||
80 | + char name[24]; | ||
81 | + | ||
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]); | ||
87 | + | ||
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); | ||
91 | + | ||
92 | + num_hd++; | ||
93 | + } | ||
94 | + } | ||
95 | + } | ||
96 | + } | ||
97 | +#endif /* __linux__ */ | ||
98 | |||
99 | /* OK, close the device map file if opened. */ | ||
100 | if (fp) |