Support for Linux I2O devices (imported from GRUB Legacy).

2006-09-17  Robert Millan  <[EMAIL PROTECTED]>

        Import from GRUB Legacy (lib/device.c):
        * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
        (init_device_map) [__linux__]: Add support for I2O devices.

-- 
Robert Millan

My spam trap is [EMAIL PROTECTED]  Note: this address is only intended for
spam harvesters.  Writing to it will get you added to my black list.
2006-09-17  Robert Millan  <[EMAIL PROTECTED]>

        Import from GRUB Legacy (lib/device.c):
        * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
        (init_device_map) [__linux__]: Add support for I2O devices.

Index: util/i386/pc/grub-mkdevicemap.c
===================================================================
RCS file: /sources/grub/grub2/util/i386/pc/grub-mkdevicemap.c,v
retrieving revision 1.3
diff -u -r1.3 grub-mkdevicemap.c
--- util/i386/pc/grub-mkdevicemap.c     14 Sep 2006 18:52:50 -0000      1.3
+++ util/i386/pc/grub-mkdevicemap.c     17 Sep 2006 21:06:27 -0000
@@ -277,6 +277,12 @@
 {
   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,
@@ -482,6 +488,23 @@
          }
       }
   }
+    
+  /* This is for I2O - we have /dev/i2o/hd<logical drive><partition> */
+  {
+    char unit;
+
+    for (unit = 'a'; unit < 'f'; unit++)
+      {
+       char name[24];
+    
+       get_i2o_disk_name (name, unit);
+       if (check_device (name))
+         {
+           fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
+           num_hd++;
+         }
+      }
+  }
 #endif /* __linux__ */
 
  finish:
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to