Re: [PATCH BlueZ 1/3] client/main: add help option for available args

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

 



Hi Ronan,

On Fri, Aug 16, 2019 at 10:46 AM Ronan Pigott <rpigott314@xxxxxxxxx> wrote:
>
> From: Ronan Pigott <rpigott@xxxxxxxxxxxx>

Can you a description of what the changes does, perhaps a sample when
uses in some command.

> ---
>  client/main.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/client/main.c b/client/main.c
> index 578b3c7c3..0f810901a 100644
> --- a/client/main.c
> +++ b/client/main.c
> @@ -800,6 +800,14 @@ static gboolean parse_argument(int argc, char *argv[], const char **arg_table,
>  {
>         const char **opt;
>
> +       if (!strcmp(argv[1], "help")) {
> +               for (opt = arg_table; opt && *opt; opt++) {
> +                       bt_shell_printf("%s\n", *opt);
> +               }
> +               bt_shell_noninteractive_quit(EXIT_SUCCESS);
> +               return FALSE;
> +       }
> +
>         if (!strcmp(argv[1], "on") || !strcmp(argv[1], "yes")) {
>                 *value = TRUE;
>                 if (option)
> --
> 2.22.1
>


-- 
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