From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 1.mo2.mail-out.ovh.net ([46.105.63.121] helo=mo2.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TjBrB-0007qn-6U for barebox@lists.infradead.org; Thu, 13 Dec 2012 16:41:59 +0000 Received: from mail426.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo2.mail-out.ovh.net (Postfix) with SMTP id 81AE6DC16E6 for ; Thu, 13 Dec 2012 17:50:24 +0100 (CET) From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 13 Dec 2012 17:40:03 +0100 Message-Id: <1355416810-26555-2-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1355416810-26555-1-git-send-email-plagnioj@jcrosoft.com> References: <20121213163758.GB26483@game.jcrosoft.org> <1355416810-26555-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/9] console: switch to kfifo_dump_str To: barebox@lists.infradead.org Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/console.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/console.c b/common/console.c index fdd5f42..96e1396 100644 --- a/common/console.c +++ b/common/console.c @@ -55,6 +55,11 @@ static struct kfifo __console_output_fifo; static struct kfifo *console_input_fifo = &__console_input_fifo; static struct kfifo *console_output_fifo = &__console_output_fifo; +static void console_output_dump(unsigned char ch) +{ + console_putc(CONSOLE_STDOUT, ch); +} + static int console_std_set(struct device_d *dev, struct param_d *param, const char *val) { @@ -86,14 +91,12 @@ static int console_std_set(struct device_d *dev, struct param_d *param, dev_param_set_generic(dev, param, active); if (initialized < CONSOLE_INIT_FULL) { - char ch; initialized = CONSOLE_INIT_FULL; PUTS_LL("Switch to console ["); PUTS_LL(dev_name(dev)); PUTS_LL("]\n"); barebox_banner(); - while (kfifo_getc(console_output_fifo, &ch) == 0) - console_putc(CONSOLE_STDOUT, ch); + kfifo_dump_str(console_output_fifo, console_output_dump); } return 0; -- 1.7.10.4 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox