Home
last modified time | relevance | path

Searched refs:img_fp (Results 1 – 5 of 5) sorted by relevance

/system/libufdt/utils/src/
Dmkdtimg_create.c56 static int output_img_with_args(FILE *img_fp, int argc, char *argv[], int arg_start) { in output_img_with_args() argument
58 struct dt_image_writer *writer = dt_image_writer_start(img_fp, entry_count); in output_img_with_args()
114 FILE *img_fp = NULL; in handle_command_create() local
125 img_fp = fopen(img_filename, "wb"); in handle_command_create()
126 if (img_fp == NULL) { in handle_command_create()
131 ret = output_img_with_args(img_fp, argc, argv, arg_start + 1); in handle_command_create()
134 if (img_fp) fclose(img_fp); in handle_command_create()
Dmkdtimg_dump.c41 static void *read_fdt_from_image(FILE *img_fp, in read_fdt_from_image() argument
47 fseek(img_fp, dt_offset, SEEK_SET); in read_fdt_from_image()
48 if (fread(fdt, dt_size, 1, img_fp) == 0) { in read_fdt_from_image()
149 static int dump_image_from_fp(FILE *out_fp, FILE *img_fp, in dump_image_from_fp() argument
152 if (fread(&header, sizeof(header), 1, img_fp) != 1) { in dump_image_from_fp()
165 fseek(img_fp, entry_offset, SEEK_SET); in dump_image_from_fp()
166 fread(&entry, sizeof(entry), 1, img_fp); in dump_image_from_fp()
172 void *fdt = read_fdt_from_image(img_fp, dt_offset, dt_size); in dump_image_from_fp()
194 FILE *img_fp = NULL; in process_command_dump() local
196 img_fp = fopen(params->img_filename, "rb"); in process_command_dump()
[all …]
Dmkdtimg_cfg_create.c73 static int output_img_with_config(FILE *img_fp, FILE *cfg_fp) { in output_img_with_config() argument
75 struct dt_image_writer *writer = dt_image_writer_start(img_fp, entry_count); in output_img_with_config()
123 FILE *img_fp = NULL; in process_command_cfg_create() local
133 img_fp = fopen(params->img_filename, "wb"); in process_command_cfg_create()
134 if (img_fp == NULL) { in process_command_cfg_create()
146 ret = output_img_with_config(img_fp, cfg_fp); in process_command_cfg_create()
149 if (img_fp) fclose(img_fp); in process_command_cfg_create()
Dmkdtimg_core.c49 FILE *img_fp; member
173 static int output_img_header(FILE *img_fp, in output_img_header() argument
182 fseek(img_fp, 0, SEEK_SET); in output_img_header()
183 fwrite(&header, sizeof(header), 1, img_fp); in output_img_header()
188 static int32_t output_img_entry(FILE *img_fp, size_t entry_offset, in output_img_entry() argument
223 fseek(img_fp, entry_offset, SEEK_SET); in output_img_entry()
224 fwrite(&entry, sizeof(entry), 1, img_fp); in output_img_entry()
227 fseek(img_fp, fdt_info->dt_offset, SEEK_SET); in output_img_entry()
228 fwrite(fdt, fdt_file_size, 1, img_fp); in output_img_entry()
240 struct dt_image_writer *dt_image_writer_start(FILE *img_fp, uint32_t entry_count) { in dt_image_writer_start() argument
[all …]
Dmkdtimg_core.h31 struct dt_image_writer *dt_image_writer_start(FILE *img_fp, uint32_t entry_count);