Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oTJ31-0005DN-Nq for mharc-grub-devel@gnu.org; Wed, 31 Aug 2022 04:26:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39730) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTJ2v-0005Ct-LI for grub-devel@gnu.org; Wed, 31 Aug 2022 04:26:01 -0400 Received: from gate.crashing.org ([63.228.1.57]:37912) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTJ2t-0005Kc-Ad for grub-devel@gnu.org; Wed, 31 Aug 2022 04:26:01 -0400 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 27V8Oslh013252 for ; Wed, 31 Aug 2022 03:24:55 -0500 Message-ID: <226fd837f78c0cbafeb29bc2ce8147d5bf6a1d3f.camel@kernel.crashing.org> Subject: [PATCH] menu: Add ctrl-L to refresh the menu From: Benjamin Herrenschmidt To: The development of GNU GRUB Date: Wed, 31 Aug 2022 18:24:28 +1000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 Received-SPF: pass client-ip=63.228.1.57; envelope-from=benh@kernel.crashing.org; helo=gate.crashing.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Aug 2022 08:26:01 -0000 This is useful on cloud instances with remote serial ports as it can be difficult to connect "fast enough" to get the initial menu display Signed-off-by: Benjamin Herrenschmidt --- grub-core/normal/menu.c | 4 ++++ docs/grub.texi | 3 +++ 2 files changed, 7 insertions(+) diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index 14ceb9bb0..5e50383a6 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -818,6 +818,10 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot= ) } goto refresh; =20 + case GRUB_TERM_CTRL | 'l': + menu_fini (); + goto refresh; + default: { int entry; diff --git a/docs/grub.texi b/docs/grub.texi index 472fbbfc8..a1f6d3fe8 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -3172,6 +3172,9 @@ If you protect the menu interface with a password (@p= xref{Security}), all you can do is choose an entry by pressing @key{RET}, or press @key{p} to enter the password. =20 +Pressing @key{Ctrl-l} will refresh the menu, which can be useful when +connecting via serial after the menu has been drawn. + =20 @node Menu entry editor @section Editing a menu entry