From 655421a962636d3e2ed2124eee8f588b0815ae3b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 3 Jul 2025 13:30:22 -0400 Subject: [PATCH] shared/shell: Fix not calling pre_run for main menu When calling bt_shell_run the main menu pre_run was not being called which cause tools with just one menu to not work as intended. Fixes: https://github.com/bluez/bluez/issues/1319 --- src/shared/shell.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/shell.c b/src/shared/shell.c index 6b4f7a7ef..ec9e5f7dc 100644 --- a/src/shared/shell.c +++ b/src/shared/shell.c @@ -1449,6 +1449,9 @@ int bt_shell_run(void) int status; const struct queue_entry *submenu; + if (data.menu && data.menu->pre_run) + data.menu->pre_run(data.menu); + for (submenu = queue_get_entries(data.submenus); submenu; submenu = submenu->next) { struct bt_shell_menu *menu = submenu->data; -- 2.47.3