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 80F8AC433F5 for ; Fri, 24 Sep 2021 21:11:05 +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 F1A3E6140A for ; Fri, 24 Sep 2021 21:11:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F1A3E6140A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 B6F4A834F1; Fri, 24 Sep 2021 23:10:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="lvDqS8q7"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F3E20834B4; Fri, 24 Sep 2021 23:08:23 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8D95E83509 for ; Fri, 24 Sep 2021 23:07:49 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: by mail.kernel.org (Postfix) with ESMTPSA id A30ED61357; Fri, 24 Sep 2021 21:07:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632517668; bh=F4O3+nBGXWWlC2L/MM7VsKRlkqCwl8th58hQWCFIH/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lvDqS8q7pHOUhckDIwGrFvz2MeYHlxRPD9mFfiKBSmxyoosI0TnLXzMHt95JWL2Vq Vg4Et/3BGdq5OFUCjAJ/z9ircvdJIzddiZX+nJXTEyJdU5nP5qDoIhZeRSIxBGQbew gQVymXFhTtsKP2yhBS8VBJCTTl0UT/ElPCjeTfhFzIlYUjaoA00aUtlKLMauAsO40j O72RyqNT1pxwvz90WajS2inRBWkt3qff/iNWZhlVXRJYMVV8TVM9IL/YUvJiSIbgQy vbgNWCOwp31P6LuZIK4SnbNtGVdEhnGzYlPutWumfQ9jjRIhT7Futr6o1ZAcwnSH25 jGIgjcdI+RS4Q== From: =?UTF-8?q?Marek=20Beh=C3=BAn?= To: Stefan Roese Cc: u-boot@lists.denx.de, pali@kernel.org, Chris Packham , Baruch Siach , Dennis Gilmore , Mario Six , Jon Nettleton , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH u-boot-marvell v3 14/39] tools: kwboot: Print new line after SPL output Date: Fri, 24 Sep 2021 23:06:51 +0200 Message-Id: <20210924210716.29752-15-kabel@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210924210716.29752-1-kabel@kernel.org> References: <20210924210716.29752-1-kabel@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 --- 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) { -- 2.32.0