diff options
Diffstat (limited to 'raid_cciss.patch')
-rw-r--r-- | raid_cciss.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/raid_cciss.patch b/raid_cciss.patch new file mode 100644 index 000000000000..ad92016d5c2d --- /dev/null +++ b/raid_cciss.patch @@ -0,0 +1,98 @@ +Index: b/lib/device.c +=================================================================== +--- a/lib/device.c ++++ b/lib/device.c +@@ -403,6 +403,18 @@ + } + + static void ++get_cciss_disk_name (char *name, int controller, int drive) ++{ ++ sprintf (name, "/dev/cciss/c%dd%d", controller, drive); ++} ++ ++static void ++get_ida_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'); +@@ -830,6 +842,74 @@ + } + } + } ++ ++ /* This is for CCISS, its like the DAC960 - we have ++ /dev/cciss/<controller>d<logical drive>p<partition> ++ ++ It currently supports up to 3 controllers, 10 logical volumes ++ and 10 partitions ++ ++ Code gratuitously copied from DAC960 above. ++ Horms <horms@verge.net.au> 23rd July 2004 ++ */ ++ { ++ int controller, drive; ++ ++ for (controller = 0; controller < 2; controller++) ++ { ++ for (drive = 0; drive < 9; 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++; ++ } ++ } ++ } ++ } ++ ++ /* This is for Compaq Smart Array, its like the DAC960 - we have ++ /dev/ida/<controller>d<logical drive>p<partition> ++ ++ It currently supports up to 3 controllers, 10 logical volumes ++ and 15 partitions ++ ++ Code gratuitously copied from DAC960 above. ++ Piotr Roszatycki <dexter@debian.org> ++ */ ++ { ++ int controller, drive; ++ ++ for (controller = 0; controller < 2; controller++) ++ { ++ for (drive = 0; drive < 9; drive++) ++ { ++ char name[24]; ++ ++ get_ida_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. */ |