All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Tom Rini <trini@konsulko.com>
Cc: Daniel Golle <daniel@makrotopia.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>,
	 Anatolij Gustschin <agust@denx.de>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>
Subject: Re: [PATCH v3 08/25] menu: Make use of CLI character processing
Date: Mon, 24 Apr 2023 13:42:13 -0600	[thread overview]
Message-ID: <CAPnjgZ1Ba6tbKfKUGOcJp2oHcmhA=UmmfhY9pxG0Rn6r+qrPTw@mail.gmail.com> (raw)
In-Reply-To: <20230424014922.GT1134230@bill-the-cat>

Hi,

On Sun, 23 Apr 2023 at 19:49, Tom Rini <trini@konsulko.com> wrote:
>
> On Tue, Apr 18, 2023 at 07:49:34PM -0600, Simon Glass wrote:
> > Hi Daniel,
> >
> > On Tue, 11 Apr 2023 at 14:19, Daniel Golle <daniel@makrotopia.org> 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 <sjg@chromium.org>
> > > > ---
> > > >
> > > > [...]
> > > > 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 (cosmetic)
> > > 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 autoboot: 2
> > >
> > > To regain the previous behavior one should change the line to
> > > #define ansi 1
> >
> > 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...
> >
> > 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.
> >
> > 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.

My main goal is to avoid this stuff in test logs, so mostly sandbox,
and having it configurable at runtime (for sandbox) would be ideal.

Making it build-time configuration is fine as a starting point.

Regards,
Simon

  reply	other threads:[~2023-04-24 19:44 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 14:52 [PATCH v3 00/25] bootstd: Add a boot menu Simon Glass
2023-01-06 14:52 ` [PATCH v3 01/25] sandbox: Enable mmc command and legacy images Simon Glass
2023-01-06 14:52 ` [PATCH v3 02/25] cli: Move readline character-processing to a state machine Simon Glass
2023-01-06 15:50   ` Heinrich Schuchardt
2023-01-07  0:13     ` Simon Glass
2023-01-07 22:31       ` Heinrich Schuchardt
2023-01-24 15:19   ` [BUG] " Heinrich Schuchardt
2023-01-28 22:01     ` Simon Glass
2023-01-06 14:52 ` [PATCH v3 03/25] bootmenu: Add a few comments Simon Glass
2023-01-06 15:53   ` Heinrich Schuchardt
2023-01-07  0:13     ` Simon Glass
2023-01-07 22:34       ` Heinrich Schuchardt
2023-01-07 22:54         ` Simon Glass
2023-01-06 14:52 ` [PATCH v3 04/25] menu: Rename KEY_... to BKEY_ Simon Glass
2023-01-06 14:52 ` [PATCH v3 05/25] menu: Update bootmenu_autoboot_loop() to return the code Simon Glass
2023-01-06 14:52 ` [PATCH v3 06/25] menu: Update bootmenu_loop() " Simon Glass
2023-01-06 14:52 ` [PATCH v3 07/25] menu: Use a switch statement Simon Glass
2023-01-06 14:52 ` [PATCH v3 08/25] menu: Make use of CLI character processing Simon Glass
2023-04-11 20:19   ` Daniel Golle
2023-04-19  1:49     ` Simon Glass
2023-04-24  1:49       ` Tom Rini
2023-04-24 19:42         ` Simon Glass [this message]
2023-01-06 14:52 ` [PATCH v3 09/25] image: Add a function to find a script in an image Simon Glass
2023-01-06 14:52 ` [PATCH v3 10/25] image: Move common image code to image_board and command Simon Glass
2023-01-06 14:52 ` [PATCH v3 11/25] video: Enable VIDEO_ANSI by default only with EFI Simon Glass
2023-01-06 14:52 ` [PATCH v3 12/25] video: truetype: Rename the metrics function Simon Glass
2023-01-06 14:52 ` [PATCH v3 13/25] video: Fix unchnaged typo Simon Glass
2023-01-06 14:52 ` [PATCH v3 14/25] video: Add font functions to the vidconsole API Simon Glass
2023-01-06 14:52 ` [PATCH v3 15/25] bootstd: Read the Operating System name for distro/scripts Simon Glass
2023-01-06 14:52 ` [PATCH v3 16/25] bootstd: Allow reading a logo for the OS Simon Glass
2023-01-06 14:52 ` [PATCH v3 17/25] menu: Factor out menu-keypress decoding Simon Glass
2023-01-06 14:52 ` [PATCH v3 18/25] expo: Add basic implementation Simon Glass
2023-01-06 14:52 ` [PATCH v3 19/25] expo: Add support for scenes Simon Glass
2023-01-06 14:52 ` [PATCH v3 20/25] expo: Add support for scene menus Simon Glass
2023-01-06 14:52 ` [PATCH v3 21/25] expo: Add basic tests Simon Glass
2023-01-06 14:52 ` [PATCH v3 22/25] bootstd: Support creating a boot menu Simon Glass
2023-01-06 14:52 ` [PATCH v3 23/25] bootstd: Add a test for the bootstd menu Simon Glass
2023-01-06 14:52 ` [PATCH v3 24/25] bootstd: Support setting a theme for the menu Simon Glass
2023-01-06 14:52 ` [PATCH v3 25/25] expo: Add documentation Simon Glass
2023-01-17 13:57 ` [PATCH v3 00/25] bootstd: Add a boot menu Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPnjgZ1Ba6tbKfKUGOcJp2oHcmhA=UmmfhY9pxG0Rn6r+qrPTw@mail.gmail.com' \
    --to=sjg@chromium.org \
    --cc=agust@denx.de \
    --cc=daniel@makrotopia.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.