From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> 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 6b4f7a7ef503..ec9e5f7dc984 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.49.0