]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2010-01-18 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 19:43:39 +0000 (19:43 +0000)
committerRobert Millan <rmh@aybabtu.com>
Mon, 18 Jan 2010 19:43:39 +0000 (19:43 +0000)
* include/grub/term.h (grub_term_register_input,
grub_term_register_output): Check return of terminal init()
routines, and abort if errors are raised.

* commands/terminal.c: Update copyright year.

ChangeLog
commands/terminal.c
include/grub/term.h

index 3111a938112028de47420670a670b4e1ba07ab86..40984c187a7b70ae23cdc1e345fe8e9185334546 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-01-18  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * include/grub/term.h (grub_term_register_input,
+       grub_term_register_output): Check return of terminal init()
+       routines, and abort if errors are raised.
+
+       * commands/terminal.c: Update copyright year.
+
 2010-01-18  Robert Millan  <rmh.grub@aybabtu.com>
 
        * commands/terminal.c (grub_cmd_terminal_input)
index bf41871805173681740d1af0508bb7eda450c889..e725123b804db59e43f67c14aba2fdfac47ddea9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  GRUB  --  GRand Unified Bootloader
- *  Copyright (C) 2009  Free Software Foundation, Inc.
+ *  Copyright (C) 2009,2010  Free Software Foundation, Inc.
  *
  *  GRUB is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
index 3d644b84826baf34e95ed4fd7a2933f450c95276..143aabe1e4a9f8c259edfdc539b86b4e26bfbd5a 100644 (file)
@@ -208,9 +208,8 @@ grub_term_register_input (const char *name __attribute__ ((unused)),
   else
     {
       /* If this is the first terminal, enable automatically.  */
-      if (term->init)
-        term->init ();
-      grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs), GRUB_AS_LIST (term));
+      if (! term->init || term->init () == GRUB_ERR_NONE)
+       grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs), GRUB_AS_LIST (term));
     }
 }
 
@@ -224,10 +223,9 @@ grub_term_register_output (const char *name __attribute__ ((unused)),
   else
     {
       /* If this is the first terminal, enable automatically.  */
-      if (term->init)
-       term->init ();
-      grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs),
-                     GRUB_AS_LIST (term));
+      if (! term->init || term->init () == GRUB_ERR_NONE)
+       grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs),
+                       GRUB_AS_LIST (term));
     }
 }