Re: [BlueZ v3 7/7] client: Fix --help hanging if bluetoothd is not running

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bastien,

On Tue, Oct 22, 2024 at 10:11 AM Bastien Nocera <hadess@xxxxxxxxxx> wrote:
>
> Exit after printing all the main and submenu commands.
> ---
>  client/main.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/client/main.c b/client/main.c
> index f60bef1a6d3a..f5ed9f9f5297 100644
> --- a/client/main.c
> +++ b/client/main.c
> @@ -3193,6 +3193,8 @@ int main(int argc, char *argv[])
>         assistant_add_submenu();
>         bt_shell_set_prompt(PROMPT_OFF, NULL);
>
> +       bt_shell_handle_non_interactive_help();
> +
>         if (agent_option)
>                 auto_register_agent = g_strdup(agent_option);
>         else
> --
> 2.47.0
>

Having some thoughts about how to do this is more clean way, perhaps
we should do this as part of bt_shell_run and then introduce .run
callback to bt_shell_menu so it is called as part of bt_shell_run,
under the .run callback the menu can place e.g. DBUS connection setup,
etc, but before it reaches that we can check if it just a help
pending.

-- 
Luiz Augusto von Dentz





[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux