Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1ogdEe-0000Eo-PT for mharc-grub-devel@gnu.org; Thu, 06 Oct 2022 22:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogdEb-0000EL-CE for grub-devel@gnu.org; Thu, 06 Oct 2022 22:37:09 -0400 Received: from gate.crashing.org ([63.228.1.57]:58659) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogdEZ-0004qv-Ck for grub-devel@gnu.org; Thu, 06 Oct 2022 22:37:09 -0400 Received: from [IPv6:::1] (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2972a0C5029851 for ; Thu, 6 Oct 2022 21:36:01 -0500 Message-ID: <593b9409b37588824c7d53ca1d505c051e982577.camel@kernel.crashing.org> Subject: [PATCH] menu: Add ctrl-L to refresh the menu From: Benjamin Herrenschmidt To: The development of GNU GRUB Date: Fri, 07 Oct 2022 13:35:59 +1100 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 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: Fri, 07 Oct 2022 02:37:09 -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 Reviewed-by: Daniel Kiper --- docs/grub.texi | 3 +++ grub-core/normal/menu.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/docs/grub.texi b/docs/grub.texi index 211cddc01..0dbbdc374 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -3222,6 +3222,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 diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index fa4871a62..6a90e091f 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -788,6 +788,10 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot= , int *notify_boot) } goto refresh; =20 + case GRUB_TERM_CTRL | 'l': + menu_fini (); + goto refresh; + default: { int entry;