]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2006-06-24 Robert Millan <robertmh@gnu.org>
authorrobertmh <robertmh@localhost>
Sat, 24 Jun 2006 14:05:38 +0000 (14:05 +0000)
committerrobertmh <robertmh@localhost>
Sat, 24 Jun 2006 14:05:38 +0000 (14:05 +0000)
        * lib/device.c (get_i2o_disk_name): New function.
        (init_device_map) [__linux__]: Add support for I2O devices.

ChangeLog
lib/device.c

index 5260219349a601835005314446e3511b1bec93a9..e3f83b7e3dec43317d805669b58dd977c8d8b23e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-24  Robert Millan  <robertmh@gnu.org>
+
+       * lib/device.c (get_i2o_disk_name): New function.
+       (init_device_map) [__linux__]: Add support for I2O devices.
+
 2006-05-02  Pavel Roskin  <proski@gnu.org>
 
        * stage2/stage2.c (run_menu): Fix "savedefault" to save only top
index d0663b396d1b3c9528bf8f7d8c7148cde14273bd..5774291c642f23de19aa854aa0b904dc8af910ee 100644 (file)
@@ -407,6 +407,12 @@ get_ataraid_disk_name (char *name, int unit)
 {
   sprintf (name, "/dev/ataraid/d%c", unit + '0');
 }
+
+static void
+get_i2o_disk_name (char *name, char unit)
+{
+  sprintf (name, "/dev/i2o/hd%c", unit);
+}
 #endif
 
 /* Check if DEVICE can be read. If an error occurs, return zero,
@@ -801,6 +807,29 @@ init_device_map (char ***map, const char *map_file, int floppy_disks)
          }
       }
   }
+    
+  /* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */
+  {
+    int unit;
+
+    for (unit = 'a'; unit < 'f'; unit++)
+      {
+        char name[24];
+    
+        get_i2o_disk_name (name, unit);
+        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.  */