SOURCES: grub-cciss-devicemap.patch (NEW) - http://svn.pardus.org....

marcus marcus at pld-linux.org
Fri Feb 22 09:39:52 CET 2008


Author: marcus                       Date: Fri Feb 22 08:39:52 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- http://svn.pardus.org.tr/viewcvs/2007/system/base/grub/files/cciss-devicemap.patch?revision=25052&root=pardus&view=markup&pathrev=25687

---- Files affected:
SOURCES:
   grub-cciss-devicemap.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/grub-cciss-devicemap.patch
diff -u /dev/null SOURCES/grub-cciss-devicemap.patch:1.1
--- /dev/null	Fri Feb 22 09:39:52 2008
+++ SOURCES/grub-cciss-devicemap.patch	Fri Feb 22 09:39:46 2008
@@ -0,0 +1,57 @@
+diff -Nur grub-0.97-old/lib/device.c grub-0.97/lib/device.c
+--- grub-0.97-old/lib/device.c	2007-05-16 15:42:56.103323942 +0300
++++ grub-0.97/lib/device.c	2007-05-16 15:43:01.129559838 +0300
+@@ -544,6 +544,12 @@
+ }
+ 
+ static void
++get_cciss_disk_name (char *name, int controller, int drive)
++{
++  sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
++}
++
++static void
+ get_ataraid_disk_name (char *name, int unit)
+ {
+   sprintf (name, "/dev/ataraid/d%c", unit + '0');
+@@ -971,6 +977,40 @@
+           }
+       }
+   }
++
++  /* This is for CCISS, its like the DAC960  - we have
++     /dev/cciss/<controller>d<logical drive>p<partition> 
++
++     It currently supports up to 3 controllers, 10 logical volumes
++     and 10 partitions
++
++     Code gratuitously copied from DAC960 above.
++     Horms <horms at verge.net.au> 23rd July 2004
++  */
++  {
++    int controller, drive;
++    
++    for (controller = 0; controller < 2; controller++)
++      {
++	for (drive = 0; drive < 9; drive++)
++	  {
++	    char name[24];
++	    
++	    get_cciss_disk_name (name, controller, drive);
++	    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 pld-cvs-commit mailing list