Attached are the patches redone against r763. onbig.patch is the whole lot. grub-xvd_drives.diff and grub-install_xvd.diff are the individual patches in non patch-of-a-patch format.
Ian. -- Ian Campbell Honi soit qui mal y pense. [Evil to him who evil thinks.] -- Motto of the Order of the Garter (est. Edward III)
Index: debian/changelog =================================================================== --- debian/changelog (revision 768) +++ debian/changelog (working copy) @@ -1,8 +1,12 @@ grub (0.97-39) unstable; urgency=low + [ Robert Millan ] * Adjust make_system_path_relative_to_its_root() not to print trailing slashes. (Closes: #479169) + [ Ian Campbell ] + * Support for Xen style xvd[a-z] devices. (Closes: #456776) + -- Robert Millan <[EMAIL PROTECTED]> Tue, 6 May 2008 15:46:48 +0200 grub (0.97-38) unstable; urgency=high Index: debian/patches/grub-xvd_drives.diff =================================================================== --- debian/patches/grub-xvd_drives.diff (revision 0) +++ debian/patches/grub-xvd_drives.diff (revision 0) @@ -0,0 +1,49 @@ +--- a/lib/device.c ++++ b/lib/device.c +@@ -395,6 +395,16 @@ + #endif + } + ++static void ++get_xvd_disk_name (char *name, int unit) ++{ ++#ifdef __linux__ ++ sprintf (name, "/dev/xvd%c", unit + 'a'); ++#else ++# warning "Xen XVD drives cannot be guessed in your operating system." ++ *name = 0; ++#endif ++} + #ifdef __linux__ + static void + get_dac960_disk_name (char *name, int controller, int drive) +@@ -770,7 +780,28 @@ + num_hd++; + } + } +- ++ ++#ifdef __linux__ ++ /* Xen Virtual Disks. */ ++ for (i = 0; i < 16; i++) ++ { ++ char name[16]; ++ ++ get_xvd_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 ++ + #ifdef __linux__ + /* This is for DAC960 - we have + /dev/rd/c<controller>d<logical drive>p<partition>. Index: debian/patches/grub-install_xvd.diff =================================================================== --- debian/patches/grub-install_xvd.diff (revision 0) +++ debian/patches/grub-install_xvd.diff (revision 0) @@ -0,0 +1,11 @@ +--- a/util/grub-install.in.orig 2008-04-24 07:25:47.000000000 +0000 ++++ b/util/grub-install.in 2008-04-24 07:31:05.000000000 +0000 +@@ -104,7 +104,7 @@ + )" + + # Convert RAID devices list into a list of disks +- tmp_disks=`echo "$devices" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \ ++ tmp_disks=`echo "$devices" | sed -e 's%\(\(s\|h\|xv\)d[a-z]\)[0-9]*$%\1%' \ + -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \ + -e 's%\(fd[0-9]*\)$%\1%' \ + -e 's%/part[0-9]*$%/disc%' \ Index: debian/patches/00list =================================================================== --- debian/patches/00list (revision 768) +++ debian/patches/00list (working copy) @@ -9,11 +9,13 @@ 2gb_limit.diff kfreebsd.diff grub-special_device_names.diff +grub-xvd_drives.diff initrd_max_address.diff splashimage_help.diff grub-install_addsyncs.diff grub-install_regexp.diff grub-install_aoe_support.diff +grub-install_xvd.diff geometry-26kernel.diff print_func.diff mprotect.diff
--- a/util/grub-install.in.orig 2008-04-24 07:25:47.000000000 +0000 +++ b/util/grub-install.in 2008-04-24 07:31:05.000000000 +0000 @@ -104,7 +104,7 @@ )" # Convert RAID devices list into a list of disks - tmp_disks=`echo "$devices" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \ + tmp_disks=`echo "$devices" | sed -e 's%\(\(s\|h\|xv\)d[a-z]\)[0-9]*$%\1%' \ -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \ -e 's%\(fd[0-9]*\)$%\1%' \ -e 's%/part[0-9]*$%/disc%' \
--- a/lib/device.c +++ b/lib/device.c @@ -395,6 +395,16 @@ #endif } +static void +get_xvd_disk_name (char *name, int unit) +{ +#ifdef __linux__ + sprintf (name, "/dev/xvd%c", unit + 'a'); +#else +# warning "Xen XVD drives cannot be guessed in your operating system." + *name = 0; +#endif +} #ifdef __linux__ static void get_dac960_disk_name (char *name, int controller, int drive) @@ -770,7 +780,28 @@ num_hd++; } } - + +#ifdef __linux__ + /* Xen Virtual Disks. */ + for (i = 0; i < 16; i++) + { + char name[16]; + + get_xvd_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 + #ifdef __linux__ /* This is for DAC960 - we have /dev/rd/c<controller>d<logical drive>p<partition>.
signature.asc
Description: This is a digitally signed message part