summarylogtreecommitdiffstats
path: root/grub-xvd_drives.patch
diff options
context:
space:
mode:
authorWilken 'Akiko' Gottwalt2021-05-27 09:29:01 +0200
committerWilken 'Akiko' Gottwalt2021-05-27 09:29:01 +0200
commit79b08b2af3a551bcc32dd469ef8b50666c581c14 (patch)
treea5fddf03bc13818aaac4fdeaf41f72ecead86e84 /grub-xvd_drives.patch
parent7c7ee87e51afb0b166e93fc399d39cf5c0729717 (diff)
downloadaur-79b08b2af3a551bcc32dd469ef8b50666c581c14.tar.gz
updated version to last maintained debian version (77)
Current binutils 2.36+ introduces an odd bug that causes the stage1 and stage2 files to bloat to over 100 MiB. This is not fixed yet.
Diffstat (limited to 'grub-xvd_drives.patch')
-rw-r--r--grub-xvd_drives.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/grub-xvd_drives.patch b/grub-xvd_drives.patch
new file mode 100644
index 000000000000..52c777383678
--- /dev/null
+++ b/grub-xvd_drives.patch
@@ -0,0 +1,51 @@
+Index: b/lib/device.c
+===================================================================
+--- 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)
+@@ -788,7 +798,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>.