mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 06/39] common: provide stubs for ctrlc_* functions
Date: Fri, 29 Nov 2019 16:14:32 +0100	[thread overview]
Message-ID: <20191129151505.23946-7-l.stach@pengutronix.de> (raw)
In-Reply-To: <20191129151505.23946-1-l.stach@pengutronix.de>

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>
---
 common/console_simple.c | 11 -----------
 include/common.h        |  5 +++++
 include/console.h       |  5 +++++
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/common/console_simple.c b/common/console_simple.c
index 6d293b2ba109..42224842c5ea 100644
--- a/common/console_simple.c
+++ b/common/console_simple.c
@@ -64,9 +64,6 @@ void console_flush(void)
 }
 EXPORT_SYMBOL(console_flush);
 
-void ctrlc_handled(void)
-{
-}
 /* test if ctrl-c was pressed */
 int ctrlc (void)
 {
@@ -81,14 +78,6 @@ int ctrlc (void)
 }
 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 65630684678c..c6eb50420f68 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 7afe59e93a27..537ac97ab34d 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
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2019-11-29 15:15 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 15:14 [PATCH 00/39] randcfg build fixes Lucas Stach
2019-11-29 15:14 ` [PATCH 01/39] ARM: imx: add image type choice Lucas Stach
2019-12-02 10:07   ` Sascha Hauer
2019-12-02 10:51     ` Lucas Stach
2019-12-04  7:26       ` Sascha Hauer
2019-11-29 15:14 ` [PATCH 02/39] ratp: add more build dependencies Lucas Stach
2019-11-29 15:14 ` [PATCH 03/39] ARM: move into ARM32 specific optee kernel start into lib32 dir Lucas Stach
2019-11-29 15:14 ` [PATCH 04/39] ARM: implement CONFIG_PBL_BREAK for ARM64 Lucas Stach
2019-11-29 15:14 ` [PATCH 05/39] lib: zstd: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` Lucas Stach [this message]
2019-11-29 15:14 ` [PATCH 07/39] commands: keystore: use correct type for s_len Lucas Stach
2019-11-29 15:14 ` [PATCH 08/39] gui: picopng: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` [PATCH 09/39] reset_source: add stub for reset_source_set_device Lucas Stach
2019-11-29 15:14 ` [PATCH 10/39] spi: fix symbol export for spi_register_controller Lucas Stach
2019-11-29 15:14 ` [PATCH 11/39] mfd: superio: add missing semicolon after EXPORT_SYMBOL Lucas Stach
2019-11-29 15:14 ` [PATCH 12/39] ARM: psci: declare locally used functions as static Lucas Stach
2019-11-29 15:14 ` [PATCH 13/39] ARM: mxs: bcb: " Lucas Stach
2019-11-29 15:14 ` [PATCH 14/39] usb: dwc3: depend on OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 15/39] mtd: nand: don't call BBT functions if BBT support isn't built Lucas Stach
2019-11-29 15:14 ` [PATCH 16/39] mfd: da9063: don't try to register gpiochip when GPIOLIB " Lucas Stach
2019-11-29 15:14 ` [PATCH 17/39] mci: MCI_IMX_ESDHC_PBL has no dependency on MCI Lucas Stach
2019-11-29 15:14 ` [PATCH 18/39] i2c: always walk down into i2c/busses Makefile Lucas Stach
2019-11-29 15:14 ` [PATCH 19/39] usb: usb251xb: depend on OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 20/39] pstore: don't try to grab non-existent logbuf Lucas Stach
2019-11-29 15:14 ` [PATCH 21/39] firmware: zynqmp-fpga: fix comparison between pointer and integer Lucas Stach
2019-11-29 15:14 ` [PATCH 22/39] pstore: ramoops: use correct format specifier for size_t variables Lucas Stach
2019-11-29 15:14 ` [PATCH 23/39] clocksource: ARMv8 timer can only be built on ARMv8 Lucas Stach
2019-11-29 15:14 ` [PATCH 24/39] input: select POLLER Lucas Stach
2019-11-29 15:14 ` [PATCH 25/39] ARM: layerscape: add missing selects for TQMLS1046A Lucas Stach
2019-11-29 15:14 ` [PATCH 26/39] ARM: PBL break is not available on ARMv4 Lucas Stach
2019-11-29 15:14 ` [PATCH 27/39] ARM: ARM_SMCCC is only available on >= ARMv7 Lucas Stach
2019-11-29 15:14 ` [PATCH 28/39] ARM: layerscape: select OFTREE and OFDEVICE Lucas Stach
2019-11-29 15:14 ` [PATCH 29/39] usb: dwc3: dual role mode needs gadget support Lucas Stach
2019-11-29 15:14 ` [PATCH 30/39] pinctrl: at91pio4: move to correct location in Kconfig Lucas Stach
2019-11-29 15:14 ` [PATCH 31/39] ARM: layerscape: ppa: use sync_for_execution instead of a manual cache flush Lucas Stach
2019-11-29 15:14 ` [PATCH 32/39] ubootvarfs: depend on OFTREE Lucas Stach
2019-11-29 15:14 ` [PATCH 33/39] ARM: davinci: virt2real: select OFTREE and OFDEVICE Lucas Stach
2019-11-29 15:15 ` [PATCH 34/39] ARM: omap: pfc200: NAND support requires CONFIG_OMAP_GPMC Lucas Stach
2019-11-29 15:15 ` [PATCH 35/39] net: designware-eqos: depend on COMMON_CLK Lucas Stach
2019-11-29 15:15 ` [PATCH 36/39] ARM: mvebu: correct DTB rule for MARVELL_ARMADA_XP_DB Lucas Stach
2019-11-29 15:15 ` [PATCH 37/39] nvme: correct symbol export name for nvme_submit_sync_cmd Lucas Stach
2019-11-29 15:15 ` [PATCH 38/39] pinctrl: tegra: mark drvdata as maybe unused Lucas Stach
2019-11-29 15:15 ` [PATCH 39/39] pinctrl: at91pio4 depends on OFDEVICE Lucas Stach
2019-12-02  8:44 ` [PATCH 00/39] randcfg build fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191129151505.23946-7-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox