|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../grub/grub-0.97-special-device-names.patch
|
|
|
|
# Copyright (C) 2007 The OpenSDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This patch file is dual-licensed. It is available under the license the
|
|
|
|
# patched project is licensed under, as long as it is an OpenSource license
|
|
|
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
|
|
|
# of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 2 of the License, or (at your option) any later
|
|
|
|
# version.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
--- grub-0.97/lib/device.c.orig 2006-12-18 20:48:51.949360000 +0200
|
|
|
|
+++ grub-0.97/lib/device.c 2006-12-18 20:49:51.737096500 +0200
|
|
|
|
@@ -861,7 +861,13 @@
|
|
|
|
if (strcmp (dev + strlen(dev) - 5, "/disc") == 0)
|
|
|
|
strcpy (dev + strlen(dev) - 5, "/part");
|
|
|
|
}
|
|
|
|
- sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1);
|
|
|
|
+ sprintf (dev + strlen(dev), "%s%d",
|
|
|
|
+ /* Compaq smart and others */
|
|
|
|
+ (strncmp(dev, "/dev/ida/", 9) == 0 ||
|
|
|
|
+ strncmp(dev, "/dev/ataraid/", 13) == 0 ||
|
|
|
|
+ strncmp(dev, "/dev/cciss/", 11) == 0 ||
|
|
|
|
+ strncmp(dev, "/dev/rd/", 8) == 0) ? "p" : "",
|
|
|
|
+ ((partition >> 16) & 0xFF) + 1);
|
|
|
|
|
|
|
|
/* Open the partition. */
|
|
|
|
fd = open (dev, O_RDWR);
|