mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jules Maselbas <jmaselbas@zdiv.net>, barebox@lists.infradead.org
Subject: Re: [RFC PATCH] fbconsole: add missing break
Date: Thu, 27 Mar 2025 09:17:30 +0100	[thread overview]
Message-ID: <25429354-d27c-40dc-8d14-dcc2fef8b74e@pengutronix.de> (raw)
In-Reply-To: <20250325160008.1076-1-jmaselbas@zdiv.net>

On 25.03.25 17:00, Jules Maselbas wrote:
> The cursor move CSI has nothing to do with the clear-screen CSI.
> The existing fallthrough looks like a bug, add the missing break.
> 
> Fixes: 27f79c05ab ("video: implement framebuffer console")
> Signed-off-by: Jules Maselbas <jmaselbas@zdiv.net>
> ---
> 
>  I am not 100% sure if this is a bug or not, it feels like it sould not
>  fallthrough, an extra look would be nice.

I think it makes sense to add the break.

case 'H' (\e[{line};{column}H) is move cursor and
case 'K' (ESC[{0,1,2}K} is erase.

The code currently interprets the same integer once as line
and another time as erase type for K, which is not lines,
but rather 0 = from cursor to end of line,
           1 = from start of line to cursor
           2 = whole line 

So this patch looks correct IMO.

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

> 
> 
>  drivers/video/fbconsole.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/video/fbconsole.c b/drivers/video/fbconsole.c
> index 24592d00ed..7462e34778 100644
> --- a/drivers/video/fbconsole.c
> +++ b/drivers/video/fbconsole.c
> @@ -576,6 +576,7 @@ static void fbc_parse_csi(struct fbc_priv *priv)
>  		priv->x = clamp(pos - 1, 0, (int) priv->cols - 1);
>  
>  		show_cursor(priv, priv->x, priv->y);
> +		break;
>  	case 'K':
>  		pos = simple_strtoul(priv->csi, &end, 10);
>  		video_invertchar(priv, priv->x, priv->y);


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2025-03-27  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-25 16:00 Jules Maselbas
2025-03-27  7:56 ` Sascha Hauer
2025-03-27  8:12 ` Sascha Hauer
2025-03-27  8:17 ` Ahmad Fatoum [this message]

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=25429354-d27c-40dc-8d14-dcc2fef8b74e@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@zdiv.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox