diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2019-11-29 16:14:32 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-12-02 11:02:21 +0100 |
commit | 0ae74f9519eba2c58e1912c14c2db9e1e40d711a (patch) | |
tree | cc983f4c24ac038cae57325b3456b4e813f23680 /include | |
parent | f6b3af28870dc9b2b7d6a7700c63a66ba198baf3 (diff) | |
download | barebox-0ae74f9519eba2c58e1912c14c2db9e1e40d711a.tar.gz barebox-0ae74f9519eba2c58e1912c14c2db9e1e40d711a.tar.xz |
common: provide stubs for ctrlc_* functions
Currently the stubs are only provided for CONFIG_CONSOLE_SIMPLE, but
they are also needed for CONSOLE_NONE. Move them to the header.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 5 | ||||
-rw-r--r-- | include/console.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index 6563068467..c6eb50420f 100644 --- a/include/common.h +++ b/include/common.h @@ -68,7 +68,12 @@ long get_ram_size (volatile long *, long); /* 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 7afe59e93a..537ac97ab3 100644 --- a/include/console.h +++ b/include/console.h @@ -207,7 +207,12 @@ static inline void pbl_set_putc(void (*putcf)(void *ctx, int c), void *ctx) {} 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 |