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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3C73EC6FD18 for ; Mon, 24 Apr 2023 01:49:34 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CDE785FE5; Mon, 24 Apr 2023 03:49:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="cKyItAqA"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D721E85350; Mon, 24 Apr 2023 03:49:30 +0200 (CEST) Received: from mail-yb1-xb31.google.com (mail-yb1-xb31.google.com [IPv6:2607:f8b0:4864:20::b31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5787F860ED for ; Mon, 24 Apr 2023 03:49:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-yb1-xb31.google.com with SMTP id 3f1490d57ef6-b95af16639cso5607583276.2 for ; Sun, 23 Apr 2023 18:49:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1682300965; x=1684892965; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=c6Toum8p7f3pMUM1hLaQBIXIFGL5NJAeqwqEjg6H0pM=; b=cKyItAqAA+wqw9coY2XvHrpQKvhPosaqtHf2f+Ewdndry5xPWdsqy0bZJg3WFa1E2b bnZblh+t+jkqwDMqbcTCRyaGFsikIaxiIUNqE1g4e4p0ZpAGv0+4Coh6Li4F06PG3KVz lwjwtHfg+qLiM/NLOX/Kc55e6zmmv8L7LcOMY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682300965; x=1684892965; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c6Toum8p7f3pMUM1hLaQBIXIFGL5NJAeqwqEjg6H0pM=; b=Bk67/nCyQ9TyUjwVFHlbKv4HSYVyW9005p7N17GZBLmft/O0OcBr3eBR0m5UBZa4B+ kerIABFIN9RB+lZDHw2C0tFamRx0fCh0Cu7/bFZWPhDDfR6fk6t2YYWu/V1/9GEfdpR3 O2VlpI5lATZo4OeAq6kNqchpZWkfDPbMDKRkt22Xcwe/tclG94s7S/OhdQGbkxL+tR1l LqDgeEq70RKVzj0YqMbwe8r4v80dVNun2MWGxFpiN800/LKwQ5+LHNnLC+Zob+dR555V DCmSC2KWLU5qs522uthvTm4tvpxAx0juSFGi1G4qhIFX61NKuAtR8y0LLMFvFIZOEJNd l+3w== X-Gm-Message-State: AAQBX9dkrp/vVtZwmpLllKGfJv6sdEOmQFqwAAUhj2pJMZbvo1ynzr3i +4+5opM4zksDUSdioAzuVUNWgw== X-Google-Smtp-Source: AKy350YK3fMm1HMMoAGYc11o+GXztIbYWFE/QlIP3HOi31imZX+8ZteSnGASqTQdj7qliy/p1UC0gA== X-Received: by 2002:a25:a:0:b0:b98:c854:8f55 with SMTP id 10-20020a25000a000000b00b98c8548f55mr8429298yba.59.1682300964974; Sun, 23 Apr 2023 18:49:24 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-aa42-f895-023e-07ab.res6.spectrum.com. [2603:6081:7b00:6400:aa42:f895:23e:7ab]) by smtp.gmail.com with ESMTPSA id d15-20020a25eb0f000000b00b8f52b11de6sm2593631ybs.42.2023.04.23.18.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Apr 2023 18:49:24 -0700 (PDT) Date: Sun, 23 Apr 2023 21:49:22 -0400 From: Tom Rini To: Simon Glass Cc: Daniel Golle , U-Boot Mailing List , Anatolij Gustschin , Heinrich Schuchardt Subject: Re: [PATCH v3 08/25] menu: Make use of CLI character processing Message-ID: <20230424014922.GT1134230@bill-the-cat> References: <20230106145243.411626-1-sjg@chromium.org> <20230106145243.411626-9-sjg@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rMkFOG4tykfr3LXW" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.8 at phobos.denx.de X-Virus-Status: Clean --rMkFOG4tykfr3LXW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 18, 2023 at 07:49:34PM -0600, Simon Glass wrote: > Hi Daniel, >=20 > On Tue, 11 Apr 2023 at 14:19, Daniel Golle wrote: > > > > On Fri, Jan 06, 2023 at 08:52:26AM -0600, Simon Glass wrote: > > > Avoid duplicating some of the escape-sequence processing here and use= the > > > CLI function instead. > > > > > > Signed-off-by: Simon Glass > > > --- > > > > > > [...] > > > diff --git a/common/menu.c b/common/menu.c > > > index 7db98942a61..45f36ae3ede 100644 > > > --- a/common/menu.c > > > +++ b/common/menu.c > > > @@ -15,6 +15,8 @@ > > > > > > #include "menu.h" > > > > > > +#define ansi 0 > > > > Now that I'm using U-Boot 2023.04 I noticed that this introduces a (cos= metic) > > regression: The autoboot countdown in bootmenu is now longer re-written= , but > > instead the last menu item line is continously appended like: > > > > U-Boot consoleHit any key to stop autoboot: 3 Hit any key to stop autob= oot: 2 > > > > To regain the previous behavior one should change the line to > > #define ansi 1 >=20 > Yes, perhaps you could send a patch? As a new CONFIG symbol, default y for the old behavior please. > > To me this looks a bit unfinished, as if there was some sort of > > probing of the terminal capabilities supposed to happen but then > > this has never been implemeneted... >=20 > I have expressed the review that ANSI should be something we can > enable or disable, rather than always having it enabled. For tests in > particular, ANSI is a pain since it messes up the logs with escape > sequences and it is hard to see what is happening. >=20 > IMO we should have an ANSI library which you call to emit sequences. > Or perhaps we could try to be clever and build them into printf() as > special strings, so long as we can avoid compiler warnings. Well, I think for starting we can just make the behavior configurable at build time. I'm not sure we need to do run-time (not clear if you're suggesting that or not), and I don't know if code changes to deal with ANSI-or-not would result in some unreasonable code growth here. --=20 Tom --rMkFOG4tykfr3LXW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmRF4B8ACgkQFHw5/5Y0 tyxSNgwAjbL3Sh+F2qclYEsoO+twFZG1tTXoDxNPtCxayvT4/4d3rpyRq8jI0S9o c2XX2Y0E/Eq7/+r401YXSqCvcJ48kCLthkHLDO1CzbMPqYJganfHwLZXhZ7jjfzc YIDRWdwsflc/G4LsB7UhFqTFyPEZq6ERveXVa1wOgzelsbq2+RWoNxip8QWaSFPy L2ovdWFat90oZ694ujmcrQPasVKTFvWopG4QuYhKtOUrm8WIR2JOcAEwwcf8F8lI gZxZO0kqxG5DGZBkHG5HjLWtpdY0UpGpdDHFVp2bveBhlA8MsZnJRdHQqeAu9QTc h4ypPB8i9tfc+mMS86OdZq5u/rLUS8sEnQqC5Wmqe4UdBkOEnBQ4lHSkkETAXIpZ LjoE6YtoBP4dzbfVvckMSlxgJxs0bP5TiZt6vd2/YKpr3gfENucN/8/tnhp+uEu4 qLTEyb7UQ8QCv/qa21pKlZtF/49GwnHehlfNX6Lp/GuUjKu6c7NusQpihwrYX+7T B5w6GHI9 =OePq -----END PGP SIGNATURE----- --rMkFOG4tykfr3LXW--