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 DB245C38142 for ; Tue, 24 Jan 2023 15:19:35 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id ED94785602; Tue, 24 Jan 2023 16:19:32 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com 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=canonical.com header.i=@canonical.com header.b="jCk8KDLX"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C8F5185408; Tue, 24 Jan 2023 16:19:31 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (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 6BD5881F28 for ; Tue, 24 Jan 2023 16:19:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4629B3F761 for ; Tue, 24 Jan 2023 15:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1674573564; bh=wBQzwNK+t3Xe92Ya0Lh1AWDTwxnHJDeGHUqv5SXrfI0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=jCk8KDLXeU3qSdi9liss2RfjuDtnlnkhaKbMpFUqKoIzn/Etz8AcLspWHZp2XZf8a 2r5hXPbAhzvyADoD6zvHuJo8s98Y0xdoRnzuGZhwQjANGI5IOMMv5wFRP/+Wf8tghf hhqsanXamDKKvIm7hrrwujdjVhBtv0nbZ8FGiTB+ZIrnPf2jfQFsq5vg9mh6WPrFoU CvvnlqiQyvAFvZxELtatpcMY5nXSYoxhHFeIjNozO4ZoI+Kg13qTUfobQD/0laooJQ A9pYs5X5lNyREGLZmhKPM/REkDg6Y4v9dmJCJck+pbBTxvfaUW4i0188JlnIvGByNN +7BY3K6h9ihhw== Received: by mail-wm1-f69.google.com with SMTP id c66-20020a1c3545000000b003d355c13229so11349171wma.0 for ; Tue, 24 Jan 2023 07:19:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wBQzwNK+t3Xe92Ya0Lh1AWDTwxnHJDeGHUqv5SXrfI0=; b=rwo9UsweDf9VYjjRHiF953oH7IzLJzMIp/uAs4cnZScbH8//dmtmOOJNs/YP5SVMIR cWlTSuEUY31VsJSLuiXOoOaCpqMzu3EtFfz4Affc9DdH4+wxGFPi0JhCAZicPBSgjLqm QqVl5n7wP4Tqw+6gk6WoaHGS7ItJGAEfFAHLc5dfu6x19rTZ1Acn89kRKN2OWmM7gOzV 0i6e9NhrtmYRo+chci+cdVwOIjqk1SkEQjRyghgaUeiwkI5dw5/DQ13+Qt3xyHlDCA47 2rdeoJeUHKdtXUBOR+FizeNef1BT4zXqXRb2U9P56dH59XDTF9zfmngMlvK9DIpUeEe+ k/tw== X-Gm-Message-State: AFqh2kqUDD27gT9me2n+FjMUgsZ9f9YtS/gcIICFI4GbVZLEOZCxa9X0 kmdGxgifzlSjD5KyY6s9Zq2D/HBc2azBfP6HkXY1Mr43fijMBPvL5KzjzfkRbhgHidMdkOcncrK OnA4jPTSfSkNSvLt+TETTaidq5eqCdxI= X-Received: by 2002:adf:c614:0:b0:248:ab8a:5144 with SMTP id n20-20020adfc614000000b00248ab8a5144mr18984804wrg.63.1674573563918; Tue, 24 Jan 2023 07:19:23 -0800 (PST) X-Google-Smtp-Source: AMrXdXvd5lTMPNjm6mgEgZCf5Rnzu20iKj28ZISyFGc3x3TUY1HTGZtg+j2Z+w4dzHJodjw8eNiJVw== X-Received: by 2002:adf:c614:0:b0:248:ab8a:5144 with SMTP id n20-20020adfc614000000b00248ab8a5144mr18984786wrg.63.1674573563586; Tue, 24 Jan 2023 07:19:23 -0800 (PST) Received: from [192.168.123.67] (ip-088-152-145-137.um26.pools.vodafone-ip.de. [88.152.145.137]) by smtp.gmail.com with ESMTPSA id e14-20020adfa44e000000b002be15ee1377sm2172262wra.22.2023.01.24.07.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Jan 2023 07:19:23 -0800 (PST) Message-ID: Date: Tue, 24 Jan 2023 16:19:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.0 Subject: [BUG] Re: [PATCH v3 02/25] cli: Move readline character-processing to a state machine Content-Language: en-US To: Simon Glass Cc: Anatolij Gustschin , Tom Rini , U-Boot Mailing List , Masahisa Kojima , Ilias Apalodimas References: <20230106145243.411626-1-sjg@chromium.org> <20230106145243.411626-3-sjg@chromium.org> From: Heinrich Schuchardt In-Reply-To: <20230106145243.411626-3-sjg@chromium.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.6 at phobos.denx.de X-Virus-Status: Clean On 1/6/23 15:52, Simon Glass wrote: > The current cread_line() function is very long. It handles the escape > processing inline. The menu command does similar processing but at the > character level, so there is some duplication. > > Split the character processing into a new function cli_ch_process() which > processes individual characters and returns the resulting input character, > taking account of escape sequences. It requires the caller to set up and > maintain its state. > > Update cread_line() to use this new function. > > The only intended functional change is that an invalid escape sequence > does not add invalid/control characters into the input buffer, but instead > discards these. > > Signed-off-by: Simon Glass > --- > Hello Simon in the Change Boot Order menu of the eficonfig command I hit the PAGE-UP or PAGE-DOWN button and get this output: [ ] label0038 [ ] label0039impossible condition #876 impossible condition #876 Press UP/DOWN to move, +/- to change orde Press SPACE to activate or deactivate the entry Select [Save] to complete, ESC/CTRL+C to quit Hitting an unsupported key should not result in output. This is the line providing the output. common/cli_getch.c:201: puts("impossible condition #876\n"); How line be reached by an "impossible condition". That text does not make any sense. This is the patch to blame b08e9d4b6632 ("cli: Move readline character-processing to a state machine") Please, remove that debug message. The conitrace command shows these escape sequences: PAGE-DOWN 1b 5b 36 7e PAGE-UP 1b 5b 35 7e Best regards Heinrich