From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 2.mo2.mail-out.ovh.net ([188.165.53.149] helo=mo2.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UD28z-0003zn-Sr for barebox@lists.infradead.org; Wed, 06 Mar 2013 00:23:44 +0000 Received: from mail180.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo2.mail-out.ovh.net (Postfix) with SMTP id BE932DC1DE1 for ; Wed, 6 Mar 2013 01:34:43 +0100 (CET) From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 6 Mar 2013 01:22:40 +0100 Message-Id: <1362529364-20651-2-git-send-email-plagnioj@jcrosoft.com> In-Reply-To: <1362529364-20651-1-git-send-email-plagnioj@jcrosoft.com> References: <20130306002138.GQ23022@game.jcrosoft.org> <1362529364-20651-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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/6] 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 beb37bd..243d402 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