2008-05-07 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS devices. * util/grub-mkdevicemap.c (get_cciss_disk_name) (make_device_map): Likewise. Reported by Roland Dreier <rdreier@cisco.com>
This commit is contained in:
parent
7f8866edc1
commit
b56c4eaa3f
3 changed files with 62 additions and 1 deletions
|
@ -283,6 +283,12 @@ get_i2o_disk_name (char *name, char unit)
|
|||
{
|
||||
sprintf (name, "/dev/i2o/hd%c", unit);
|
||||
}
|
||||
|
||||
static void
|
||||
get_cciss_disk_name (char *name, int controller, int drive)
|
||||
{
|
||||
sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check if DEVICE can be read. If an error occurs, return zero,
|
||||
|
@ -504,6 +510,30 @@ make_device_map (const char *device_map, int floppy_disks)
|
|||
}
|
||||
}
|
||||
|
||||
/* This is for CCISS - we have
|
||||
/dev/cciss/c<controller>d<logical drive>p<partition>. */
|
||||
{
|
||||
int controller, drive;
|
||||
|
||||
for (controller = 0; controller < 3; controller++)
|
||||
{
|
||||
for (drive = 0; drive < 10; drive++)
|
||||
{
|
||||
char name[24];
|
||||
|
||||
get_cciss_disk_name (name, controller, drive);
|
||||
if (check_device (name))
|
||||
{
|
||||
char *p;
|
||||
p = grub_util_get_disk_name (num_hd, name);
|
||||
fprintf (fp, "(%s)\t%s\n", p, name);
|
||||
free (p);
|
||||
num_hd++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */
|
||||
{
|
||||
char unit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue