Bug#374952: fixed upstream

Robert Millan rmh at aybabtu.com
Sat Jun 24 14:31:40 UTC 2006


tags 374952 fixed-upstream
thanks

Now fixed in upstream CVS.  This is the patch I committed (the last hunk was
invalid, hence removed).

-- 
Robert Millan
-------------- next part --------------
diff -ur grub-0.97.old/lib/device.c grub-0.97/lib/device.c
--- grub-0.97.old/lib/device.c      2006-06-21 14:51:37.000000000 -0400
+++ grub-0.97/lib/device.c          2006-06-21 14:52:10.000000000 -0400
@@ -560,6 +560,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,
@@ -1022,6 +1028,29 @@
     }
       }
   }
+    
+  /* 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.  */
 


More information about the Pkg-grub-devel mailing list