@Roland Kammerer: yes, that works too.

On Wed, Feb 12, 2020 at 1:08 PM Anton Tykhyy <[email protected]> wrote:

> To reproduce the bug:
> >> drbdsetup new-resource test 0; drbdsetup show --json|jq
> > parse error: Expected separator between values at line 6, column 21
> ---
>  user/v9/drbdsetup.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/user/v9/drbdsetup.c b/user/v9/drbdsetup.c
> index de752484..4798cf62 100644
> --- a/user/v9/drbdsetup.c
> +++ b/user/v9/drbdsetup.c
> @@ -2401,13 +2401,16 @@ static void show_resource_list_json(struct
> resources_list *resources_list, char*
>                         printf("\n");
>                 }
>
> -               printI(QUOTED("volumes") ": [\n");
> -               indent++;
> -               for (device = devices; device; device = device->next)
> -                       show_volume_json(device);
> +               if (devices)
> +               {
> +                       printI(QUOTED("volumes") ": [\n");
> +                       indent++;
> +                       for (device = devices; device; device =
> device->next)
> +                               show_volume_json(device);
>
> -               --indent;
> -               printI("]\n");
> +                       --indent;
> +                       printI("]\n");
> +               }
>
>                 --indent;
>                 printI("}");
> --
> 2.21.0.windows.1
>
>
_______________________________________________
Star us on GITHUB: https://github.com/LINBIT
drbd-user mailing list
[email protected]
https://lists.linbit.com/mailman/listinfo/drbd-user

Reply via email to