From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 604FEC433F5 for ; Fri, 1 Oct 2021 06:20:18 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AD3B661A57 for ; Fri, 1 Oct 2021 06:20:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD3B661A57 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E12A083257; Fri, 1 Oct 2021 08:20:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1633069216; bh=l4az4p5gv0zdBOzqAA44PV7CGvIFjJT6GcJ2EY1clZY=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KRmWTgs33/jWU9N7iydXp3uNsEVi0/540lf9MjM2zVQpqId0i8UPYOBFVjn5Arugd Bh62KuB36We2jeXjXDXReUMiTHULK1eGsoVk3YBpS8gVo67SAtr7+Kt/hT5vui02o6 UhnuSUh6gdSvNykvOLuY45I4863XwHAu+KTO1CBQHwf0xk8zAy8ZpmH46/1Aipt8rK XeNu2nShXj+wz9Fg2aOgMKJldLH/bWWgp5BttVdnlX0jR9N72dDn98ptwoq7qW/3cx nC0R7PLOwa1BC/lsz5oSNHevscFght4GHKlDF/SZ/IFx/cS3B6PnIVt28Dj6ugF3b3 QKdOlydYdpSPw== Received: by phobos.denx.de (Postfix, from userid 109) id A5B9783267; Fri, 1 Oct 2021 08:20:13 +0200 (CEST) Received: from mout-u-107.mailbox.org (mout-u-107.mailbox.org [91.198.250.252]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D58E48320D for ; Fri, 1 Oct 2021 08:20:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=sr@denx.de Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-107.mailbox.org (Postfix) with ESMTPS id 4HLKj65gzNzQjPj; Fri, 1 Oct 2021 08:20:10 +0200 (CEST) Subject: Re: [PATCH u-boot-marvell v3 14/39] tools: kwboot: Print new line after SPL output To: =?UTF-8?Q?Marek_Beh=c3=ban?= Cc: u-boot@lists.denx.de, pali@kernel.org, Chris Packham , Baruch Siach , Dennis Gilmore , Mario Six , Jon Nettleton , =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20210924210716.29752-1-kabel@kernel.org> <20210924210716.29752-15-kabel@kernel.org> From: Stefan Roese Message-ID: <86593f27-2dcc-7ba4-72ab-83c547c98862@denx.de> Date: Fri, 1 Oct 2021 08:20:06 +0200 MIME-Version: 1.0 In-Reply-To: <20210924210716.29752-15-kabel@kernel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 69EBC1841 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 24.09.21 23:06, Marek Behún wrote: > From: Marek Behún > > There is no separation between output from the code from binary header > (U-Boot SPL in most cases) and subsequent kwboot output. > > Print '\n' to make distinguishing these two easier. > > Signed-off-by: Marek Behún Reviewed-by: Stefan Roese Thanks, Stefan > --- > tools/kwboot.c | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/tools/kwboot.c b/tools/kwboot.c > index 4636622a6c..2f4c61bed6 100644 > --- a/tools/kwboot.c > +++ b/tools/kwboot.c > @@ -382,10 +382,12 @@ _is_xm_reply(char c) > } > > static int > -kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm) > +kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm, int *non_xm_print) > { > int rc; > > + *non_xm_print = 0; > + > while (1) { > rc = kwboot_tty_recv(fd, c, 1, blk_rsp_timeo); > if (rc) { > @@ -405,6 +407,7 @@ kwboot_xm_recv_reply(int fd, char *c, int allow_non_xm) > if (allow_non_xm) { > putchar(*c); > fflush(stdout); > + *non_xm_print = 1; > } > } > > @@ -415,6 +418,7 @@ static int > kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, > int *done_print) > { > + int non_xm_print; > int rc, retries; > char c; > > @@ -432,7 +436,7 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, > *done_print = 1; > } > > - rc = kwboot_xm_recv_reply(fd, &c, allow_non_xm); > + rc = kwboot_xm_recv_reply(fd, &c, allow_non_xm, &non_xm_print); > if (rc) > return rc; > > @@ -440,6 +444,9 @@ kwboot_xm_sendblock(int fd, struct kwboot_block *block, int allow_non_xm, > kwboot_progress(-1, '+'); > } while (c == NAK && retries-- > 0); > > + if (non_xm_print) > + kwboot_printv("\n"); > + > rc = -1; > > switch (c) { > Viele Grüße, Stefan -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de