OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
2.0 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../grub/grub-0.93-graphics-bootterm.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. --- grub-0.93/stage2/builtins.c.bootterm 2002-12-29 02:01:50.000000000 -0500
  17. +++ grub-0.93/stage2/builtins.c 2002-12-29 02:01:07.000000000 -0500
  18. @@ -233,12 +233,22 @@
  19. static int
  20. boot_func (char *arg, int flags)
  21. {
  22. + struct term_entry *prev_term = current_term;
  23. /* Clear the int15 handler if we can boot the kernel successfully.
  24. This assumes that the boot code never fails only if KERNEL_TYPE is
  25. not KERNEL_TYPE_NONE. Is this assumption is bad? */
  26. if (kernel_type != KERNEL_TYPE_NONE)
  27. unset_int15_handler ();
  28. + /* if our terminal needed initialization, we should shut it down
  29. + * before booting the kernel, but we want to save what it was so
  30. + * we can come back if needed */
  31. + if (current_term->shutdown)
  32. + {
  33. + (*current_term->shutdown)();
  34. + current_term = term_table; /* assumption: console is first */
  35. + }
  36. +
  37. #ifdef SUPPORT_NETBOOT
  38. /* Shut down the networking. */
  39. cleanup_net ();
  40. @@ -302,6 +312,13 @@
  41. return 1;
  42. }
  43. + /* if we get back here, we should go back to what our term was before */
  44. + current_term = prev_term;
  45. + if (current_term->startup)
  46. + /* if our terminal fails to initialize, fall back to console since
  47. + * it should always work */
  48. + if ((*current_term->startup)() == 0)
  49. + current_term = term_table; /* we know that console is first */
  50. return 0;
  51. }