aboutsummaryrefslogtreecommitdiffstats
path: root/stubdom/grub.patches/20print_func.diff
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-18 09:36:47 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-18 09:36:47 +0100
commita2c7db64f561821fd528614e68c4d92718210126 (patch)
tree79c7e1c3ef49b5b4272fd12d36420e6fb8d23cd1 /stubdom/grub.patches/20print_func.diff
parent7074b13cee246f09b3b0a2a6da139b2e047cf4a4 (diff)
downloadxen-a2c7db64f561821fd528614e68c4d92718210126.tar.gz
xen-a2c7db64f561821fd528614e68c4d92718210126.tar.bz2
xen-a2c7db64f561821fd528614e68c4d92718210126.zip
Add PV-GRUB
This fetches GRUB1 sources, applies the {graphical, print function, save default, and ext3_256byte} patches from debian, and applies a patch to make it work on x86_64 and port it to Mini-OS. By using libxc, PV-GRUB can then "kexec" the loaded kernel from inside the domain itself, hence permitting to avoid the security-concerned pygrub. Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'stubdom/grub.patches/20print_func.diff')
-rw-r--r--stubdom/grub.patches/20print_func.diff80
1 files changed, 80 insertions, 0 deletions
diff --git a/stubdom/grub.patches/20print_func.diff b/stubdom/grub.patches/20print_func.diff
new file mode 100644
index 0000000000..ec9da0ea4e
--- /dev/null
+++ b/stubdom/grub.patches/20print_func.diff
@@ -0,0 +1,80 @@
+2006-01-05 Otavio Salvador <otavio@debian.org>
+
+ * Rediff.
+
+2005-16-10 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * docs/grub.texi: Added print command description.
+ * stage2/builtins.c(print_func): New function.
+ (builtin_print): New variable.
+ (builtin_table): Added builtin_print in table.
+
+Debian Status Following:
+ Added by: Otavio Salvador
+ Date: 2006-01-05
+
+diff -Nur grub-0.97-bkp/docs/grub.texi grub-0.97/docs/grub.texi
+--- grub-0.97-bkp/docs/grub.texi 2006-01-05 10:59:05.564347912 -0200
++++ grub-0.97/docs/grub.texi 2006-01-05 11:18:59.033912960 -0200
+@@ -2685,6 +2685,7 @@
+ * module:: Load a module
+ * modulenounzip:: Load a module without decompression
+ * pause:: Wait for a key press
++* print:: Print a message
+ * quit:: Exit from the grub shell
+ * reboot:: Reboot your computer
+ * read:: Read data from memory
+@@ -3091,6 +3092,16 @@
+ @end deffn
+
+
++@node print
++@subsection print
++
++@deffn Command print message @dots{}
++Print the @var{message}. Note that placing @key{^G} (ASCII code 7) in the
++message will cause the speaker to emit the standard beep sound, which is
++useful for visually impaired people.
++@end deffn
++
++
+ @node quit
+ @subsection quit
+
+diff -Nur grub-0.97-bkp/stage2/builtins.c grub-0.97/stage2/builtins.c
+--- grub-0.97-bkp/stage2/builtins.c 2006-01-05 10:59:05.550350040 -0200
++++ grub-0.97/stage2/builtins.c 2006-01-05 11:19:28.422445224 -0200
+@@ -2323,6 +2323,25 @@
+ "Probe I/O ports used for the drive DRIVE."
+ };
+
++/* print */
++static int
++print_func (char *arg, int flags)
++{
++ printf("%s\n", arg);
++
++ return 0;
++}
++
++static struct builtin builtin_print =
++{
++ "print",
++ print_func,
++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_NO_ECHO,
++ "print [MESSAGE ...]",
++ "Print MESSAGE."
++};
++
++
+
+ /* kernel */
+ static int
+@@ -4848,6 +4867,7 @@
+ &builtin_parttype,
+ &builtin_password,
+ &builtin_pause,
++ &builtin_print,
+ #ifdef GRUB_UTIL
+ &builtin_quit,
+ #endif /* GRUB_UTIL */