Lines Matching refs:wtr
180 struct json_writer *wtr);
187 struct json_writer *wtr) in do_search() argument
200 if (wtr) in do_search()
201 jsonw_start_array(wtr); in do_search()
204 err = func(fd, info, data, wtr); in do_search()
209 if (wtr) in do_search()
210 jsonw_end_array(wtr); in do_search()
215 if (!wtr && name && !res.nr_errs && !res.nr_maps) in do_search()
221 else if (!wtr && json_output && !res.nr_errs) in do_search()
236 struct json_writer *wtr) in do_one_id() argument
279 if (wtr) in do_one_id()
280 jsonw_start_array(wtr); in do_one_id()
282 if (func(fd, info, data, wtr)) in do_one_id()
284 else if (!wtr && json_output) in do_one_id()
294 if (wtr) in do_one_id()
295 jsonw_end_array(wtr); in do_one_id()
307 struct json_writer *wtr) in do_work_on_struct_ops() argument
311 return do_one_id(search_term, func, data, wtr); in do_work_on_struct_ops()
316 return do_search(search_term, func, data, wtr); in do_work_on_struct_ops()
320 struct json_writer *wtr) in __do_show() argument
322 if (wtr) { in __do_show()
323 jsonw_start_object(wtr); in __do_show()
324 jsonw_uint_field(wtr, "id", info->id); in __do_show()
325 jsonw_string_field(wtr, "name", info->name); in __do_show()
326 jsonw_string_field(wtr, "kernel_struct_ops", in __do_show()
328 jsonw_end_object(wtr); in __do_show()
357 struct json_writer *wtr) in __do_dump() argument
390 jsonw_start_object(wtr); in __do_dump()
391 jsonw_name(wtr, "bpf_map_info"); in __do_dump()
393 jsonw_end_object(wtr); in __do_dump()
395 jsonw_start_object(wtr); in __do_dump()
396 jsonw_name(wtr, struct_ops_name); in __do_dump()
398 jsonw_end_object(wtr); in __do_dump()
408 json_writer_t *wtr = json_wtr; in do_dump() local
426 wtr = jsonw_new(stdout); in do_dump()
427 if (!wtr) { in do_dump()
431 jsonw_pretty(wtr, true); in do_dump()
435 d.jw = wtr; in do_dump()
440 wtr); in do_dump()
443 jsonw_destroy(&wtr); in do_dump()
449 struct json_writer *wtr) in __do_unregister() argument