git-svn-id: http://svn.ipfire.org/svn/ipfire/IPFire/source@16 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

This commit is contained in:
ipfire
2006-02-15 21:15:54 +00:00
parent 6d63f4c4b3
commit cd1a292722
1206 changed files with 185026 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
--- grub-0.93/stage2/builtins.c.bootterm 2002-12-29 02:01:50.000000000 -0500
+++ grub-0.93/stage2/builtins.c 2002-12-29 02:01:07.000000000 -0500
@@ -233,12 +233,22 @@
static int
boot_func (char *arg, int flags)
{
+ struct term_entry *prev_term = current_term;
/* Clear the int15 handler if we can boot the kernel successfully.
This assumes that the boot code never fails only if KERNEL_TYPE is
not KERNEL_TYPE_NONE. Is this assumption is bad? */
if (kernel_type != KERNEL_TYPE_NONE)
unset_int15_handler ();
+ /* if our terminal needed initialization, we should shut it down
+ * before booting the kernel, but we want to save what it was so
+ * we can come back if needed */
+ if (current_term->shutdown)
+ {
+ (*current_term->shutdown)();
+ current_term = term_table; /* assumption: console is first */
+ }
+
#ifdef SUPPORT_NETBOOT
/* Shut down the networking. */
cleanup_net ();
@@ -302,6 +312,13 @@
return 1;
}
+ /* if we get back here, we should go back to what our term was before */
+ current_term = prev_term;
+ if (current_term->startup)
+ /* if our terminal fails to initialize, fall back to console since
+ * it should always work */
+ if ((*current_term->startup)() == 0)
+ current_term = term_table; /* we know that console is first */
return 0;
}