Message ID | 20230617104956.1402370-4-sjg@chromium.org |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Q3zBpzps; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qjt9h50HXz20WR for <incoming@patchwork.ozlabs.org>; Sat, 17 Jun 2023 20:51:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B8F4686306; Sat, 17 Jun 2023 12:50:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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=chromium.org header.i=@chromium.org header.b="Q3zBpzps"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF1CC862FA; Sat, 17 Jun 2023 12:50:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 0FB1C862F1 for <u-boot@lists.denx.de>; Sat, 17 Jun 2023 12:50:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f8d65ecdbbso12255965e9.0 for <u-boot@lists.denx.de>; Sat, 17 Jun 2023 03:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686999020; x=1689591020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ATKENVqgkhfYYW2DieCHQZ8dZA7J5h366yGQwujwv8w=; b=Q3zBpzpsXLB6mZehcqL3zSw2VI56iMW+4F4ogNcCyk/7PzAahlSND5tfot4ZlCPy8b KtGJVTYiWVqKO6tJRUQ17TZHcM+72AsQtSiRQyJMk0pA5gIOH1yGpXVjWqzEygTvW7ML c0FT6hq1AmIuNEmKGHLDrAuvoAGCHAVkG/JIk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686999020; x=1689591020; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ATKENVqgkhfYYW2DieCHQZ8dZA7J5h366yGQwujwv8w=; b=jqUFtXHc4VXkDmk0elJVrEWc/NkUIW74d4lVcjVn2M0gx4t5tkjue8t0bNxP38RJho anDakYxINPrxQOfDZvcKbVX5jODpRIlfUnS0nFY4swdDj5UDByLZzIfyhAguTV3mbqIA Z3R3kobEoFAXRLgAk8eqU55CF9tRUInH+AdwmDPItPFsvOmbN7b40GmFiUiPbwFAzZAQ p+dVFL9pUJhQwb/4W7Cno3rCnU+jKsF9cY/pzzejunalQhaLEApSoA0D7tCjyPnb0DZO 1QvDwaDTz2ZlmXNoeOk/MI0if29KgP3WDpwkq6iS7KmX0GJfNKwF2HZAxLAWuvFLisxB 9QRw== X-Gm-Message-State: AC+VfDzq/dwmaS4cW0J5zBZ6GUtn+yBVkMHhc++k+N4a2BJr1po7cxuG lmcw+GJ4v9yXxJe1IiiFn+fxhQnLFmQGvuWf/g4= X-Google-Smtp-Source: ACHHUZ7ReNO7dSCmkEGcMCW5xbP7qUOv93NYo1iV81BPpuGgIeiVb0UwacDy2DP4C6+4nMsMD7dtgQ== X-Received: by 2002:a7b:c3d5:0:b0:3f7:38e1:5e53 with SMTP id t21-20020a7bc3d5000000b003f738e15e53mr3452938wmj.4.1686999020509; Sat, 17 Jun 2023 03:50:20 -0700 (PDT) Received: from sjg1.roam.corp.google.com (79-67-123-132.dynamic.dsl.as9105.com. [79.67.123.132]) by smtp.gmail.com with ESMTPSA id l22-20020a7bc356000000b003f7e4d143cfsm4735171wmj.15.2023.06.17.03.50.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 03:50:20 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: =?utf-8?q?Pali_Roh=C3=A1r?= <pali@kernel.org>, Simon Glass <sjg@chromium.org> Subject: [PATCH 3/6] bootmenu: Cancel delay only when a real key is pressed Date: Sat, 17 Jun 2023 11:49:50 +0100 Message-ID: <20230617104956.1402370-4-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog In-Reply-To: <20230617104956.1402370-1-sjg@chromium.org> References: <20230617104956.1402370-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean |
Series |
nokia_nx51: Attempts to debug keyboard
|
expand
|
diff --git a/common/menu.c b/common/menu.c index b55cf7b99967..c81494b3d1f3 100644 --- a/common/menu.c +++ b/common/menu.c @@ -446,11 +446,14 @@ enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu, continue; } - menu->delay = -1; c = getchar(); ichar = cli_ch_process(cch, c); + if (!ichar) + continue; + menu->delay = -1; + switch (ichar) { case '\0': key = BKEY_NONE;
We need to decode the input character before deciding if it is a real key, or just part of an escape sequence. Check this. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/menu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)