The set of processes attached to tuntap are displayed
as JSON array, but was missing the inner brackets to
allow for multiple processes.
Fixes: 689bef5dc97a ("tuntap: support JSON output")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
!strcmp(name, value)) {
SPRINT_BUF(pname);
+ open_json_object(NULL);
if (get_task_name(pid, pname, sizeof(pname)))
print_string(PRINT_ANY, "name",
"%s", "<NULL>");
"%s", pname);
print_uint(PRINT_ANY, "pid", "(%d)", pid);
+ close_json_object();
}
free(key);