X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=devlink%2Fdevlink.c;h=bb4588e22f14d9f26a98884750701bdf05cfc49d;hb=e533faa72e91ba7d42f7bfd921380d0540f369e8;hp=67681492f2b4e5bfcfcd3654fd1cf7e128f0b111;hpb=7b6361bf61205e06ffca36cc6356e3b80c83212b;p=mirror_iproute2.git diff --git a/devlink/devlink.c b/devlink/devlink.c index 67681492..bb4588e2 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2112,7 +2112,19 @@ static void __pr_out_port_handle_start(struct dl *dl, const char *bus_name, open_json_object(buf); } } else { - pr_out("%s:", buf); + if (array) { + if (should_arr_last_port_handle_end(dl, bus_name, dev_name, port_index)) + __pr_out_indent_dec(); + if (should_arr_last_port_handle_start(dl, bus_name, + dev_name, port_index)) { + pr_out("%s:", buf); + __pr_out_newline(); + __pr_out_indent_inc(); + arr_last_port_handle_set(dl, bus_name, dev_name, port_index); + } + } else { + pr_out("%s:", buf); + } } }