2008-06-04 Robert Millan <rmh@aybabtu.com>

* util/biosdisk.c (get_os_disk): Handle IDA devices.
        * util/grub-mkdevicemap.c (get_mmc_disk_name)
        (make_device_map): Likewise.
This commit is contained in:
robertmh 2008-06-04 11:20:36 +00:00
parent 00c108a446
commit e6a30859dd
3 changed files with 47 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-06-04 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (get_os_disk): Handle IDA devices.
* util/grub-mkdevicemap.c (get_mmc_disk_name)
(make_device_map): Likewise.
2008-06-01 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL

View file

@ -646,6 +646,17 @@ get_os_disk (const char *os_dev)
return path;
}
/* If this is a Compaq Intelligent Drive Array. */
if (strncmp ("ida/c", p, sizeof ("ida/c") - 1) == 0)
{
/* /dev/ida/c[0-9]+d[0-9]+(p[0-9]+)? */
p = strchr (p, 'p');
if (p)
*p = '\0';
return path;
}
/* If this is a MultiMediaCard (MMC). */
if (strncmp ("mmcblk", p, sizeof ("mmcblk") - 1) == 0)
{

View file

@ -296,6 +296,12 @@ 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_mmc_disk_name (char *name, int unit)
{
@ -584,6 +590,30 @@ make_device_map (const char *device_map, int floppy_disks)
}
}
/* This is for Compaq Intelligent Drive Array - we have
/dev/ida/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_ida_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;