Lines Matching refs:img_fp
39 static void *read_fdt_from_image(FILE *img_fp, in read_fdt_from_image() argument
45 fseek(img_fp, dt_offset, SEEK_SET); in read_fdt_from_image()
46 if (fread(fdt, dt_size, 1, img_fp) == 0) { in read_fdt_from_image()
158 static int dump_image_from_fp(FILE *out_fp, FILE *img_fp, in dump_image_from_fp() argument
161 if (fread(&header, sizeof(header), 1, img_fp) != 1) { in dump_image_from_fp()
181 fseek(img_fp, entry_offset, SEEK_SET); in dump_image_from_fp()
182 if (fread(&entry, sizeof(entry), 1, img_fp) != 1) { in dump_image_from_fp()
191 void *fdt = read_fdt_from_image(img_fp, dt_offset, dt_size); in dump_image_from_fp()
213 FILE *img_fp = NULL; in process_command_dump() local
215 img_fp = fopen(params->img_filename, "rb"); in process_command_dump()
216 if (img_fp == NULL) { in process_command_dump()
229 ret = dump_image_from_fp(out_fp ? out_fp : stdout, img_fp, params); in process_command_dump()
232 if (img_fp) fclose(img_fp); in process_command_dump()