Lines Matching refs:disp
72 static int encode_value(struct display_info *disp, char **arg, int arg_count, in encode_value() argument
85 if (disp->verbose) in encode_value()
89 fmt[1] = disp->type ? disp->type : 'd'; in encode_value()
93 if (disp->type == 's') in encode_value()
96 len = disp->size == -1 ? 4 : disp->size; in encode_value()
105 if (disp->type == 's') { in encode_value()
107 if (disp->verbose) in encode_value()
116 if (disp->verbose) { in encode_value()
118 disp->size == 1 ? "byte" : in encode_value()
119 disp->size == 2 ? "short" : "int", in encode_value()
126 if (disp->verbose) in encode_value()
328 static int do_fdtput(struct display_info *disp, const char *filename, in do_fdtput() argument
340 switch (disp->oper) { in do_fdtput()
347 if (disp->auto_path && create_paths(&blob, *arg)) in do_fdtput()
349 if (encode_value(disp, arg + 2, arg_count - 2, &value, &len) || in do_fdtput()
355 if (disp->auto_path) in do_fdtput()
418 struct display_info disp; in main() local
421 memset(&disp, '\0', sizeof(disp)); in main()
422 disp.size = -1; in main()
423 disp.oper = OPER_WRITE_PROP; in main()
435 disp.oper = OPER_CREATE_NODE; in main()
438 disp.oper = OPER_REMOVE_NODE; in main()
441 disp.oper = OPER_DELETE_PROP; in main()
444 disp.auto_path = 1; in main()
447 if (utilfdt_decode_type(optarg, &disp.type, in main()
448 &disp.size)) in main()
453 disp.verbose = 1; in main()
466 if (disp.oper == OPER_WRITE_PROP) { in main()
473 if (disp.oper == OPER_DELETE_PROP) in main()
477 if (do_fdtput(&disp, filename, argv, argc)) in main()