Lines Matching refs:disp
67 static int show_data(struct display_info *disp, const char *data, int len) in show_data() argument
80 is_string = (disp->type) == 's' || in show_data()
81 (!disp->type && util_is_printable_string(data, len)); in show_data()
94 size = disp->size; in show_data()
103 fmt[1] = disp->type ? disp->type : 'd'; in show_data()
206 static int show_data_for_item(const void *blob, struct display_info *disp, in show_data_for_item() argument
212 switch (disp->mode) { in show_data_for_item()
225 if (show_data(disp, value, len)) in show_data_for_item()
229 } else if (disp->default_val) { in show_data_for_item()
230 puts(disp->default_val); in show_data_for_item()
250 static int do_fdtget(struct display_info *disp, const char *filename, in do_fdtget() argument
264 if (disp->default_val) { in do_fdtget()
265 puts(disp->default_val); in do_fdtget()
275 if (show_data_for_item(blob, disp, node, prop)) { in do_fdtget()
314 struct display_info disp; in main() local
318 memset(&disp, '\0', sizeof(disp)); in main()
319 disp.size = -1; in main()
320 disp.mode = MODE_SHOW_VALUE; in main()
326 if (utilfdt_decode_type(optarg, &disp.type, in main()
327 &disp.size)) in main()
332 disp.mode = MODE_LIST_PROPS; in main()
337 disp.mode = MODE_LIST_SUBNODES; in main()
342 disp.default_val = optarg; in main()
363 if (do_fdtget(&disp, filename, argv, argc, args_per_step)) in main()