Skip to contentSkip to conversation

menu: Add ctrl-L to refresh the menu

PATCH In review Benjamin Herrenschmidt 2 participants 5 messages Aug 31, 2022 – Oct 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 menu: Add ctrl-L to refresh the menu

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

---
 grub-core/normal/menu.c | 4 ++++
 docs/grub.texi          | 3 +++
 2 files changed, 7 insertions(+)
grub-core/normal/menu.c +4 -0
index 14ceb9bb0..5e50383a6 100644
@@ -818,6 +818,10 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
 		}
 	      goto refresh;
 
+	    case GRUB_TERM_CTRL | 'l':
+	      menu_fini ();
+	      goto refresh;
+
 	    default:
 	      {
 		int entry;
docs/grub.texi +3 -0
index 472fbbfc8..a1f6d3fe8 100644
@@ -3172,6 +3172,9 @@ If you protect the menu interface with a password (@pxref{Security}),
 all you can do is choose an entry by pressing @key{RET}, or press
 @key{p} to enter the password.
 
+Pressing @key{Ctrl-l} will refresh the menu, which can be useful when
+connecting via serial after the menu has been drawn.
+
 
 @node Menu entry editor
 @section Editing a menu entry
#1 lore raw
Quoted 4 lines · Benjamin Herrenschmidt

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

I am OK with this patch but it does not seem to apply on master. Please rebase and repost.

Daniel

#2 lore raw
Quoted 8 lines · Daniel Kiper
Quoted 4 lines · Benjamin Herrenschmidt

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

I am OK with this patch but it does not seem to apply on master. Please rebase and repost.

Odd, I must have screwed up something, will do.

Thanks !

Cheers,
Ben.

#3 lore raw
In reply to Daniel Kiper
Quoted 11 lines · Daniel Kiper
Quoted 5 lines · Benjamin Herrenschmidt

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

I am OK with this patch but it does not seem to apply on master. Please
rebase and repost.

Hrm... what am I missing ?

My clone of master is at d9b4638c50b16d4722e66d334e2c1a674b4a45cc (no commit since Aug 20)

I've just run git am on the email I sent on Aug 31 (retreived from my local grub-devel archive) and it applied fine on top of the above.

Cheers,
Ben.

#4 lore raw
Quoted 13 lines · Benjamin Herrenschmidt
Quoted 11 lines · Daniel Kiper
Quoted 5 lines · Benjamin Herrenschmidt

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

I am OK with this patch but it does not seem to apply on master. Please
rebase and repost.

Quoted 7 lines

Hrm... what am I missing ?

My clone of master is at d9b4638c50b16d4722e66d334e2c1a674b4a45cc (no commit since Aug 20)

I've just run git am on the email I sent on Aug 31 (retreived from my local grub-devel archive) and it applied fine on top of the above.

Surprisingly patch applies but line numbers in the patch are incorrect if you look at the current master. I think you generated the patch from different branch. If you could regenerate the patch from current master that would be perfect. Feel free to add
"Reviewed-by: Daniel Kiper <[email protected]>".

Daniel