Lines Matching defs:wtr
182 struct json_writer *wtr);
186 * Then call "func(fd, info, data, wtr)" on each struct_ops map found.
189 struct json_writer *wtr)
202 if (wtr)
203 jsonw_start_array(wtr);
206 err = func(fd, info, data, wtr);
211 if (wtr)
212 jsonw_end_array(wtr);
217 if (!wtr && name && !res.nr_errs && !res.nr_maps)
223 else if (!wtr && json_output && !res.nr_errs)
224 /* The "func()" above is not writing any json (i.e. !wtr
238 struct json_writer *wtr)
281 if (func(fd, info, data, wtr))
283 else if (!wtr && json_output)
284 /* The "func()" above is not writing any json (i.e. !wtr
303 struct json_writer *wtr)
307 return do_one_id(search_term, func, data, wtr);
312 return do_search(search_term, func, data, wtr);
316 struct json_writer *wtr)
318 if (wtr) {
319 jsonw_start_object(wtr);
320 jsonw_uint_field(wtr, "id", info->id);
321 jsonw_string_field(wtr, "name", info->name);
322 jsonw_string_field(wtr, "kernel_struct_ops",
324 jsonw_end_object(wtr);
353 struct json_writer *wtr)
362 /* note: d->jw == wtr */
386 jsonw_start_object(wtr);
387 jsonw_name(wtr, "bpf_map_info");
389 jsonw_end_object(wtr);
391 jsonw_start_object(wtr);
392 jsonw_name(wtr, struct_ops_name);
394 jsonw_end_object(wtr);
404 json_writer_t *wtr = json_wtr;
422 wtr = jsonw_new(stdout);
423 if (!wtr) {
427 jsonw_pretty(wtr, true);
431 d.jw = wtr;
436 wtr);
439 jsonw_destroy(&wtr);
445 struct json_writer *wtr)