]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-06-04 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Wed, 4 Jun 2008 11:20:36 +0000 (11:20 +0000)
committerrobertmh <robertmh@localhost>
Wed, 4 Jun 2008 11:20:36 +0000 (11:20 +0000)
        * util/biosdisk.c (get_os_disk): Handle IDA devices.
        * util/grub-mkdevicemap.c (get_mmc_disk_name)
        (make_device_map): Likewise.

ChangeLog
util/biosdisk.c
util/grub-mkdevicemap.c

index f2513e07e7928bb43094faf41a6ef123bfac3d11..86c9012a773478d7cefdbe8447df2a4273df6707 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index b42c06df876ebe69c0e0beaa51fc683af4758a91..68f6b567d2aa122ad6ff2ac9ef0e5f355de730f0 100644 (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)
        {
index 4bb1c486ec06d8343826a1319aaae3589dd99ef7..5b89437044de3b89235c153926e57b75a0decb2d 100644 (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)
 {
@@ -583,6 +589,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> */
   {