OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
3.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../grub/more-raid.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- grub-0.95/lib/device.c.moreraid 2004-11-30 17:09:36.736099360 -0500
  17. +++ grub-0.95/lib/device.c 2004-11-30 17:12:17.319686944 -0500
  18. @@ -544,6 +544,17 @@
  19. }
  20. static void
  21. +get_cciss_disk_name (char * name, int controller, int drive)
  22. +{
  23. + sprintf (name, "/dev/cciss/c%dd%d", controller, drive);
  24. +}
  25. +
  26. +static void
  27. +get_cpqarray_disk_name (char * name, int controller, int drive)
  28. +{
  29. + sprintf (name, "/dev/ida/c%dd%d", controller, drive);
  30. +}
  31. +static void
  32. get_ataraid_disk_name (char *name, int unit)
  33. {
  34. sprintf (name, "/dev/ataraid/d%c", unit + '0');
  35. @@ -920,7 +931,7 @@
  36. for (controller = 0; controller < 8; controller++)
  37. {
  38. - for (drive = 0; drive < 15; drive++)
  39. + for (drive = 0; drive < 32; drive++)
  40. {
  41. char name[24];
  42. @@ -940,6 +951,70 @@
  43. }
  44. }
  45. #endif /* __linux__ */
  46. +
  47. +#ifdef __linux__
  48. + /* This is for cciss - we have
  49. + /dev/cciss/c<controller>d<logical drive>p<partition>.
  50. +
  51. + cciss driver currently supports up to 8 controllers, 16 logical
  52. + drives, and 7 partitions. */
  53. + {
  54. + int controller, drive;
  55. +
  56. + for (controller = 0; controller < 8; controller++)
  57. + {
  58. + for (drive = 0; drive < 16; drive++)
  59. + {
  60. + char name[24];
  61. +
  62. + get_cciss_disk_name (name, controller, drive);
  63. + if (check_device (name))
  64. + {
  65. + (*map)[num_hd + 0x80] = strdup (name);
  66. + assert ((*map)[num_hd + 0x80]);
  67. +
  68. + /* If the device map file is opened, write the map. */
  69. + if (fp)
  70. + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
  71. +
  72. + num_hd++;
  73. + }
  74. + }
  75. + }
  76. + }
  77. +#endif /* __linux__ */
  78. +
  79. +#ifdef __linux__
  80. + /* This is for cpqarray - we have
  81. + /dev/ida/c<controller>d<logical drive>p<partition>.
  82. +
  83. + cpqarray driver currently supports up to 8 controllers, 16 logical
  84. + drives, and 15 partitions. */
  85. + {
  86. + int controller, drive;
  87. +
  88. + for (controller = 0; controller < 8; controller++)
  89. + {
  90. + for (drive = 0; drive < 15; drive++)
  91. + {
  92. + char name[24];
  93. +
  94. + get_cpqarray_disk_name (name, controller, drive);
  95. + if (check_device (name))
  96. + {
  97. + (*map)[num_hd + 0x80] = strdup (name);
  98. + assert ((*map)[num_hd + 0x80]);
  99. +
  100. + /* If the device map file is opened, write the map. */
  101. + if (fp)
  102. + fprintf (fp, "(hd%d)\t%s\n", num_hd, name);
  103. +
  104. + num_hd++;
  105. + }
  106. + }
  107. + }
  108. + }
  109. +#endif /* __linux__ */
  110. /* OK, close the device map file if opened. */
  111. if (fp)