2009-07-29 Felix Zielcke <fzielcke@z-51.de>

* util/deviceiter.c (get_acceleraid_disk_name): New static
	function.
	(grub_util_iterate_devices): Handle Accelraid devices.
	* util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
This commit is contained in:
fzielcke 2009-07-29 14:11:50 +00:00
parent 388a7c7593
commit 67bb323a1c
3 changed files with 44 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2009-07-29 Felix Zielcke <fzielcke@z-51.de>
* util/deviceiter.c (get_acceleraid_disk_name): New static
function.
(grub_util_iterate_devices): Handle Accelraid devices.
* util/hostdisk.c (convert_system_partition_to_system_disk): Likewise.
2009-07-28 Robert Millan <rmh.grub@aybabtu.com> 2009-07-28 Robert Millan <rmh.grub@aybabtu.com>
* loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as * loader/i386/linux.c (grub_cmd_linux): Use ',' rather than ';' as

View file

@ -288,6 +288,12 @@ get_dac960_disk_name (char *name, int controller, int drive)
sprintf (name, "/dev/rd/c%dd%d", controller, drive); sprintf (name, "/dev/rd/c%dd%d", controller, drive);
} }
static void
get_acceleraid_disk_name (char *name, int controller, int drive)
{
sprintf (name, "/dev/rs/c%dd%d", controller, drive);
}
static void static void
get_ataraid_disk_name (char *name, int unit) get_ataraid_disk_name (char *name, int unit)
{ {
@ -545,6 +551,27 @@ grub_util_iterate_devices (int NESTED_FUNC_ATTR (*hook) (const char *, int),
} }
} }
/* This is for Mylex Acceleraid - we have
/dev/rd/c<controller>d<logical drive>p<partition>. */
{
int controller, drive;
for (controller = 0; controller < 8; controller++)
{
for (drive = 0; drive < 15; drive++)
{
char name[24];
get_acceleraid_disk_name (name, controller, drive);
if (check_device (name))
{
if (hook (name, 0))
return;
}
}
}
}
/* This is for CCISS - we have /* This is for CCISS - we have
/dev/cciss/c<controller>d<logical drive>p<partition>. */ /dev/cciss/c<controller>d<logical drive>p<partition>. */
{ {

View file

@ -743,6 +743,16 @@ convert_system_partition_to_system_disk (const char *os_dev)
return path; return path;
} }
/* If this is a Mylex AcceleRAID Array. */
if (strncmp ("rs/c", p, 4) == 0)
{
/* /dev/rd/c[0-9]+d[0-9]+(p[0-9]+)? */
p = strchr (p, 'p');
if (p)
*p = '\0';
return path;
}
/* If this is a CCISS disk. */ /* If this is a CCISS disk. */
if (strncmp ("cciss/c", p, sizeof ("cciss/c") - 1) == 0) if (strncmp ("cciss/c", p, sizeof ("cciss/c") - 1) == 0)
{ {