diff --git a/common/console_simple.c b/common/console_simple.c index 6d293b2..4222484 100644 --- a/common/console_simple.c +++ b/common/console_simple.c @@ -64,9 +64,6 @@ } EXPORT_SYMBOL(console_flush); -void ctrlc_handled(void) -{ -} /* test if ctrl-c was pressed */ int ctrlc (void) { @@ -81,14 +78,6 @@ } EXPORT_SYMBOL(ctrlc); -void console_ctrlc_allow(void) -{ -} - -void console_ctrlc_forbid(void) -{ -} - int console_register(struct console_device *newcdev) { if (console) diff --git a/include/common.h b/include/common.h index 6563068..c6eb504 100644 --- a/include/common.h +++ b/include/common.h @@ -68,7 +68,12 @@ /* common/console.c */ int ctrlc(void); int arch_ctrlc(void); + +#ifdef CONFIG_CONSOLE_FULL void ctrlc_handled(void); +#else +static inline void ctrlc_handled(void) { } +#endif #ifdef CONFIG_ARCH_HAS_STACK_DUMP void dump_stack(void); diff --git a/include/console.h b/include/console.h index 7afe59e..537ac97 100644 --- a/include/console.h +++ b/include/console.h @@ -207,7 +207,12 @@ bool console_allow_color(void); +#ifdef CONFIG_CONSOLE_FULL void console_ctrlc_allow(void); void console_ctrlc_forbid(void); +#else +static inline void console_ctrlc_allow(void) { } +static inline void console_ctrlc_forbid(void) { } +#endif #endif