diff --git a/include/grub/term.h b/include/grub/term.h index 143aabe1e..9500e1c99 100644 --- a/include/grub/term.h +++ b/include/grub/term.h @@ -213,6 +213,14 @@ grub_term_register_input (const char *name __attribute__ ((unused)), } } +static inline void +grub_term_register_input_active (const char *name __attribute__ ((unused)), + grub_term_input_t term) +{ + if (! term->init || term->init () == GRUB_ERR_NONE) + grub_list_push (GRUB_AS_LIST_P (&grub_term_inputs), GRUB_AS_LIST (term)); +} + static inline void grub_term_register_output (const char *name __attribute__ ((unused)), grub_term_output_t term) @@ -229,6 +237,15 @@ grub_term_register_output (const char *name __attribute__ ((unused)), } } +static inline void +grub_term_register_output_active (const char *name __attribute__ ((unused)), + grub_term_output_t term) +{ + if (! term->init || term->init () == GRUB_ERR_NONE) + grub_list_push (GRUB_AS_LIST_P (&grub_term_outputs), + GRUB_AS_LIST (term)); +} + static inline void grub_term_unregister_input (grub_term_input_t term) {