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 E15CCEB64DA for ; Sat, 17 Jun 2023 10:50:49 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE3F9862F5; Sat, 17 Jun 2023 12:50:28 +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="hq4uCxvv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C73C586309; Sat, 17 Jun 2023 12:50:24 +0200 (CEST) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 5790E862E3 for ; Sat, 17 Jun 2023 12:50:22 +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-x336.google.com with SMTP id 5b1f17b1804b1-3f8f3786f1dso15452965e9.2 for ; Sat, 17 Jun 2023 03:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1686999021; x=1689591021; 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=sFeUfAYar/2bofagY4thyyaFRaph2jhgAkTyBYdz0VU=; b=hq4uCxvv3cMxobyM+Mn9K8QDm4CyvVoOQqsXweKdxOrGTGPDxIEbjd+O60HQOVo0Bg IxmncUWxYGL8przb3W3pWQ3ujLeOaeMpOKPZ7ZYR90nmslNX1f1/1KQ5jIWjMDXvcZCX K7tfk2YznMaHeiac4k3kp0ragtLOkuRrag7D4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686999021; x=1689591021; 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=sFeUfAYar/2bofagY4thyyaFRaph2jhgAkTyBYdz0VU=; b=YeRrvLvTZl1urfX9QxYmE19DTN9lyvyOW7RlBuDXv9Rv0N5c0OqJp+EHoCCiPG30bx iPzoVySJQbLj5vRprN1poVE2J3hJZSvuXTGlxo9ZA4UjPrciDpRWziF+ilAnHU1iQ5pI mtb85j0XQZJ81tRfM/LJv8VRDewp7cRJfvv6rqozmN3G3qLkq27bzbEgVOkbc71Ar76i WOQcB+4i5HCRzEw08SpXtfFNRfFXHmk/lLjSoFWdgd4n9q4wVYNbbq9seZ2Wu9Z1OI1O mqrsHi3HqC6Lv4acyibMVrWfVdMyuvFwzcR/Rppwr5Nx9YSrdEDLjenZrnOuliOMYheZ tdvw== X-Gm-Message-State: AC+VfDyva5iBpGe1/LwZ8s9qBxe0NhfE7G420FPbC4zNIw25M55WVhaq pWlMHm8xi75JRS7xIDAIJvlxC8RHquH+u9pDIm8= X-Google-Smtp-Source: ACHHUZ7uDcsrIGYV/Lpjh9SR8HAlkRQeAnlJN3MDmidCXdvDGQq9cqtNpQhHjDtXN2qLIb4cDenKLA== X-Received: by 2002:a7b:cb9a:0:b0:3f9:3de:f285 with SMTP id m26-20020a7bcb9a000000b003f903def285mr1572086wmi.5.1686999021777; Sat, 17 Jun 2023 03:50:21 -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.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 03:50:21 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: =?UTF-8?q?Pali=20Roh=C3=A1r?= , Simon Glass Subject: [PATCH 4/6] boobtmenu: Add debugging Date: Sat, 17 Jun 2023 11:49:51 +0100 Message-ID: <20230617104956.1402370-5-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 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 Signed-off-by: Simon Glass --- cmd/bootmenu.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c index 6baeedc69f91..b2fb119e70f9 100644 --- a/cmd/bootmenu.c +++ b/cmd/bootmenu.c @@ -18,6 +18,8 @@ #include #include +#define ansi 0 + /* maximum bootmenu entries */ #define MAX_COUNT 99 @@ -101,6 +103,7 @@ static char *bootmenu_choice_entry(void *data) /* Some key was pressed, so autoboot was stopped */ key = bootmenu_loop(menu, cch); } + printf("[got bkey %d]\n", key); switch (key) { case BKEY_UP: @@ -521,9 +524,11 @@ static enum bootmenu_ret bootmenu_show(int delay) /* Default menu entry is always first */ menu_default_set(menu, "0"); - puts(ANSI_CURSOR_HIDE); - puts(ANSI_CLEAR_CONSOLE); - printf(ANSI_CURSOR_POSITION, 1, 1); + if (ansi) { +// puts(ANSI_CURSOR_HIDE); +// puts(ANSI_CLEAR_CONSOLE); +// printf(ANSI_CURSOR_POSITION, 1, 1); + } init = 1; @@ -566,10 +571,10 @@ cleanup: menu_destroy(menu); bootmenu_destroy(bootmenu); - if (init) { - puts(ANSI_CURSOR_SHOW); - puts(ANSI_CLEAR_CONSOLE); - printf(ANSI_CURSOR_POSITION, 1, 1); + if (init && ansi) { +// puts(ANSI_CURSOR_SHOW); +// puts(ANSI_CLEAR_CONSOLE); +// printf(ANSI_CURSOR_POSITION, 1, 1); } if (title && command) { -- 2.41.0.162.gfafddb0af9-goog