On Wed, 2008-05-07 at 13:33 -0400, Pavel Roskin wrote: > Apparently, it was copied from the code that was inside an extra "for" > loop. Anyway, it's a very minor issue, and I would just apply the patch > right now, but I prefer not to write changelog entries for others.
Sorry about that. An updated version is attached with changelog and
(hopefully) correct indentation.
I wasn't sure about the pre-processor conditionals, there seems to be
lots of existing ifdef __linux__ in there and the device path is pretty
Linux specific. I merged it into the one above but if you want them gone
I will redo.
Ian.
--
Ian Campbell
omnibiblious, adj.:
Indifferent to type of drink. Ex: "Oh, you can get me anything.
I'm omnibiblious."
diff -purN -X /home/ijc/development/dontdiff.txt grub2-1.96+20080430.orig/ChangeLog grub2-1.96+20080430/ChangeLog
--- grub2-1.96+20080430.orig/ChangeLog 2008-04-30 12:06:26.000000000 +0100
+++ grub2-1.96+20080430/ChangeLog 2008-05-07 19:41:10.000000000 +0100
@@ -1,3 +1,9 @@
+2008-05-07 Ian Campbell <[EMAIL PROTECTED]>
+
+ * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
+ * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
+ (make_device_map): Output entries for xvd type disks.
+
2008-04-30 Robert Millan <[EMAIL PROTECTED]>
Based on patch from Fabian Greffrath <[EMAIL PROTECTED]>
diff -purN -X /home/ijc/development/dontdiff.txt grub2-1.96+20080430.orig/util/biosdisk.c grub2-1.96+20080430/util/biosdisk.c
--- grub2-1.96+20080430.orig/util/biosdisk.c 2008-04-07 16:00:27.000000000 +0100
+++ grub2-1.96+20080430/util/biosdisk.c 2008-05-07 19:34:42.000000000 +0100
@@ -645,6 +645,13 @@ get_os_disk (const char *os_dev)
return path;
}
+ if ((strncmp ("xvd", p, 3) == 0) && p[3] >= 'a' && p[3] <= 'z')
+ {
+ /* /dev/xvd[a-z][0-9]* */
+ p[4] = '\0';
+ return path;
+ }
+
/* If this is an IDE disk or a SCSI disk. */
if ((strncmp ("hd", p, 2) == 0
|| strncmp ("sd", p, 2) == 0)
diff -purN -X /home/ijc/development/dontdiff.txt grub2-1.96+20080430.orig/util/grub-mkdevicemap.c grub2-1.96+20080430/util/grub-mkdevicemap.c
--- grub2-1.96+20080430.orig/util/grub-mkdevicemap.c 2008-04-06 18:51:55.000000000 +0100
+++ grub2-1.96+20080430/util/grub-mkdevicemap.c 2008-05-07 19:49:26.000000000 +0100
@@ -273,6 +273,12 @@ get_i2o_disk_name (char *name, char unit
{
sprintf (name, "/dev/i2o/hd%c", unit);
}
+
+static void
+get_xvd_disk_name (char *name, int unit)
+{
+ sprintf (name, "/dev/xvd%c", unit + 'a');
+}
#endif
/* Check if DEVICE can be read. If an error occurs, return zero,
@@ -513,6 +519,22 @@ make_device_map (const char *device_map,
}
}
}
+
+ /* Xen Virtual Disks. */
+ for (i = 0; i < 16; i++)
+ {
+ char name[16];
+
+ get_xvd_disk_name (name, i);
+ if (check_device (name))
+ {
+ char *p;
+ p = grub_util_get_disk_name (num_hd, name);
+ fprintf (fp, "(%s)\t%s\n", p, name);
+ free (p);
+ num_hd++;
+ }
+ }
#endif /* __linux__ */
finish:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Grub-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/grub-devel
