summaryrefslogtreecommitdiffstats
path: root/abs/not_built/core/grub-gfx/i2o.patch
blob: 2af846c90f5eacb44606d62b8645f3556eba4a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Only in grub-0.94/docs: grub.info
Only in grub-0.94/docs: multiboot.info
diff -ur grub-0.94/lib/device.c grub-0.94.new/lib/device.c
--- grub-0.94/lib/device.c	2004-05-07 04:50:36.375238696 +0200
+++ grub-0.94.new/lib/device.c	2004-05-07 04:48:57.611253104 +0200
@@ -419,6 +419,12 @@
 {
   sprintf (name, "/dev/rd/c%dd%d", controller, drive);
 }
+
+static void
+get_i2o_disk_name (char *name, int unit)
+{
+  sprintf (name, "/dev/i2o/hd%c", unit + 'a');
+}
 #endif
 
 /* Check if DEVICE can be read. If an error occurs, return zero,
@@ -789,6 +795,26 @@
 	  }
       }
   }
+
+  /* I2O disks.  */
+  for (i = 0; i < 8; i++)
+    {
+      char name[16];
+      
+      get_i2o_disk_name (name, i);
+      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.  */