Christian Wiese
17 years ago
1 changed files with 117 additions and 0 deletions
@ -0,0 +1,117 @@
|
||||
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||
#
|
||||
# Filename: package/.../grub/more-raid.patch
|
||||
# Copyright (C) 2007 The OpenSDE Project
|
||||
#
|
||||
# More information can be found in the files COPYING and README.
|
||||
#
|
||||
# This patch file is dual-licensed. It is available under the license the
|
||||
# patched project is licensed under, as long as it is an OpenSource license
|
||||
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||
# of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 2 of the License, or (at your option) any later
|
||||
# version.
|
||||
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||
|
||||
--- grub-0.95/lib/device.c.moreraid 2004-11-30 17:09:36.736099360 -0500
|
||||
+++ grub-0.95/lib/device.c 2004-11-30 17:12:17.319686944 -0500
|
||||
@@ -544,6 +544,17 @@
|
||||
}
|
||||
|
||||
static void
|
||||
+get_cciss_disk_name (char * name, int controller, int drive)
|
||||
+{
|
||||
+ sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+get_cpqarray_disk_name (char * name, int controller, int drive)
|
||||
+{
|
||||
+ sprintf (name, "/dev/ida/c%dd%d", controller, drive);
|
||||
+}
|
||||
+static void
|
||||
get_ataraid_disk_name (char *name, int unit)
|
||||
{
|
||||
sprintf (name, "/dev/ataraid/d%c", unit + '0');
|
||||
@@ -920,7 +931,7 @@
|
||||
|
||||
for (controller = 0; controller < 8; controller++)
|
||||
{
|
||||
- for (drive = 0; drive < 15; drive++)
|
||||
+ for (drive = 0; drive < 32; drive++)
|
||||
{
|
||||
char name[24];
|
||||
|
||||
@@ -940,6 +951,70 @@
|
||||
}
|
||||
}
|
||||
#endif /* __linux__ */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ /* This is for cciss - we have
|
||||
+ /dev/cciss/c<controller>d<logical drive>p<partition>.
|
||||
+
|
||||
+ cciss driver currently supports up to 8 controllers, 16 logical
|
||||
+ drives, and 7 partitions. */
|
||||
+ {
|
||||
+ int controller, drive;
|
||||
+
|
||||
+ for (controller = 0; controller < 8; controller++)
|
||||
+ {
|
||||
+ for (drive = 0; drive < 16; drive++)
|
||||
+ {
|
||||
+ char name[24];
|
||||
+
|
||||
+ get_cciss_disk_name (name, controller, drive);
|
||||
+ if (check_device (name))
|
||||
+ {
|
||||
+ (*map)[num_hd + 0x80] = strdup (name);
|
||||
+ assert ((*map)[num_hd + 0x80]);
|
||||
+
|
||||
+ /* If the device map file is opened, write the map. */
|
||||
+ if (fp)
|
||||
+ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
+
|
||||
+ num_hd++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* __linux__ */
|
||||
+
|
||||
+#ifdef __linux__
|
||||
+ /* This is for cpqarray - we have
|
||||
+ /dev/ida/c<controller>d<logical drive>p<partition>.
|
||||
+
|
||||
+ cpqarray driver currently supports up to 8 controllers, 16 logical
|
||||
+ drives, and 15 partitions. */
|
||||
+ {
|
||||
+ int controller, drive;
|
||||
+
|
||||
+ for (controller = 0; controller < 8; controller++)
|
||||
+ {
|
||||
+ for (drive = 0; drive < 15; drive++)
|
||||
+ {
|
||||
+ char name[24];
|
||||
+
|
||||
+ get_cpqarray_disk_name (name, controller, drive);
|
||||
+ if (check_device (name))
|
||||
+ {
|
||||
+ (*map)[num_hd + 0x80] = strdup (name);
|
||||
+ assert ((*map)[num_hd + 0x80]);
|
||||
+
|
||||
+ /* If the device map file is opened, write the map. */
|
||||
+ if (fp)
|
||||
+ fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
|
||||
+
|
||||
+ num_hd++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+#endif /* __linux__ */
|
||||
|
||||
/* OK, close the device map file if opened. */
|
||||
if (fp)
|
||||
|
Loading…
Reference in new issue