Lines Matching refs:disp
53 static int show_data(struct display_info *disp, const char *data, int len) in show_data() argument
66 is_string = (disp->type) == 's' || in show_data()
67 (!disp->type && util_is_printable_string(data, len)); in show_data()
80 size = disp->size; in show_data()
89 fmt[1] = disp->type ? disp->type : 'd'; in show_data()
192 static int show_data_for_item(const void *blob, struct display_info *disp, in show_data_for_item() argument
198 switch (disp->mode) { in show_data_for_item()
211 if (show_data(disp, value, len)) in show_data_for_item()
215 } else if (disp->default_val) { in show_data_for_item()
216 puts(disp->default_val); in show_data_for_item()
236 static int do_fdtget(struct display_info *disp, const char *filename, in do_fdtget() argument
250 if (disp->default_val) { in do_fdtget()
251 puts(disp->default_val); in do_fdtget()
260 if (show_data_for_item(blob, disp, node, prop)) in do_fdtget()
294 struct display_info disp; in main() local
298 memset(&disp, '\0', sizeof(disp)); in main()
299 disp.size = -1; in main()
300 disp.mode = MODE_SHOW_VALUE; in main()
312 if (utilfdt_decode_type(optarg, &disp.type, in main()
313 &disp.size)) in main()
318 disp.mode = MODE_LIST_PROPS; in main()
323 disp.mode = MODE_LIST_SUBNODES; in main()
328 disp.default_val = optarg; in main()
349 if (do_fdtget(&disp, filename, argv, argc, args_per_step)) in main()