/u-boot/tools/gdb/ |
A D | gdbsend.c | 85 if ((image = (char *)malloc(ist.st_size)) == NULL) in main() 86 Perror("can't allocate %ld bytes for image", ist.st_size); in main() 88 if ((c = read(ifd, image, ist.st_size)) < 0) in main() 89 Perror("read of %d bytes from '%s' failed", ist.st_size, ifn); in main() 91 if (c != ist.st_size) in main() 92 Error("read of %ld bytes from '%s' failed (%d)", ist.st_size, ifn, c); in main() 105 remote_write_bytes(addr, image, ist.st_size); in main()
|
/u-boot/tools/ |
A D | mkeficapsule.c | 165 src_size = pub_key.st_size; in add_public_key() 192 dtb.st_size += src_size + 0x30; in add_public_key() 193 if (ftruncate(destfd, dtb.st_size)) { in add_public_key() 241 munmap(dptr, dtb.st_size); in add_public_key() 279 data = malloc(bin_stat.st_size); in create_fwbin() 296 + bin_stat.st_size; in create_fwbin() 325 image.update_image_size = bin_stat.st_size; in create_fwbin() 335 size = fread(data, 1, bin_stat.st_size, g); in create_fwbin() 336 if (size < bin_stat.st_size) { in create_fwbin() 340 size = fwrite(data, 1, bin_stat.st_size, f); in create_fwbin() [all …]
|
A D | fit_common.c | 67 sbuf->st_size += size_inc; in mmap_fdt() 68 if (ftruncate(fd, sbuf->st_size)) { in mmap_fdt() 76 ptr = mmap(0, sbuf->st_size, in mmap_fdt() 95 ret = fdt_open_into(ptr, ptr, sbuf->st_size); in mmap_fdt()
|
A D | aisimage.c | 204 ais_img_size = ALIGN(sbuf.st_size, WORD_ALIGN0) + MAX_CMD_BUFFER; in ais_alloc_buffer() 205 ptr = (uint32_t *)malloc(ALIGN(sbuf.st_size, WORD_ALIGN0) in ais_alloc_buffer() 240 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in ais_copy_image() 243 *aisptr++ = sbuf.st_size; in ais_copy_image() 244 memcpy((void *)aisptr, ptr, sbuf.st_size); in ais_copy_image() 245 aisptr += ALIGN(sbuf.st_size, WORD_ALIGN0) / sizeof(uint32_t); in ais_copy_image() 247 (void) munmap((void *)ptr, sbuf.st_size); in ais_copy_image()
|
A D | dumpimage.c | 37 sbuf->st_size, ¶ms); in dumpimage_extract_subimage() 162 if ((uint32_t)sbuf.st_size < tparams->header_size) { in main() 168 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); in main() 198 (void)munmap((void *)ptr, sbuf.st_size); in main()
|
A D | imagetool.c | 45 sbuf->st_size, params); in imagetool_verify_print_header() 76 retval = tparams->verify_header((unsigned char *)ptr, sbuf->st_size, in imagetool_verify_print_header_by_type() 147 return sbuf.st_size; in imagetool_get_filesize()
|
A D | fit_check_sign.c | 95 (void) munmap((void *)fit_blob, fsbuf.st_size); in main() 96 (void) munmap((void *)key_blob, ksbuf.st_size); in main()
|
A D | mkimage.c | 411 if ((unsigned)sbuf.st_size < tparams->header_size) { in main() 418 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); in main() 442 (void) munmap((void *)ptr, sbuf.st_size); in main() 464 params.file_size = sbuf.st_size + tparams->header_size; in main() 505 size = cpu_to_uimage (sbuf.st_size); in main() 627 params.file_size = sbuf.st_size; in main() 629 map_len = sbuf.st_size; in main() 707 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in copy_file() 722 if ((unsigned)sbuf.st_size < tparams->header_size) { in copy_file() 741 size = sbuf.st_size - offset; in copy_file() [all …]
|
A D | imx8image.c | 327 if (sbuf.st_size == 0) in copy_file_aligned() 337 size = sbuf.st_size; in copy_file_aligned() 357 munmap((void *)ptr, sbuf.st_size); in copy_file_aligned() 387 if (sbuf.st_size == 0) in copy_file() 397 size = sbuf.st_size; in copy_file() 434 munmap((void *)ptr, sbuf.st_size); in copy_file() 465 munmap((void *)ptr, sbuf.st_size); in read_dcd_offset() 827 ALIGN(sbuf.st_size, sector_size), in build_container() 831 file_off += ALIGN(sbuf.st_size, sector_size); in build_container() 846 sbuf.st_size, in build_container() [all …]
|
A D | default_image.c | 103 sbuf->st_size - sizeof(image_header_t)); in image_set_header() 111 imagesize = sbuf->st_size - sizeof(image_header_t) in image_set_header() 115 imagesize = sbuf->st_size - sizeof(image_header_t); in image_set_header()
|
A D | rkcommon.c | 498 (int)sbuf.st_size, padded_size); in copy_file() 500 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in copy_file() 507 size = sbuf.st_size; in copy_file() 514 munmap((void *)ptr, sbuf.st_size); in copy_file() 519 munmap((void *)ptr, sbuf.st_size); in copy_file()
|
A D | fit_image.c | 52 destfd_size = dest_sbuf.st_size; in fit_add_file_data() 84 munmap(ptr, sbuf.st_size); in fit_add_file_data() 145 ret = fdt_property_placeholder(fdt, "data", sbuf.st_size, &ptr); in fdt_property_file() 148 ret = read(fd, ptr, sbuf.st_size); in fdt_property_file() 149 if (ret != sbuf.st_size) { in fdt_property_file() 514 munmap(fdt, sbuf.st_size); in fit_extract_data() 550 munmap(fdt, sbuf.st_size); in fit_extract_data() 574 size = sbuf.st_size + 16384; in fit_import_data() 619 munmap(old_fdt, sbuf.st_size); in fit_import_data() 649 munmap(old_fdt, sbuf.st_size); in fit_import_data()
|
A D | stm32image.c | 132 stm32hdr->image_length = cpu_to_le32((uint32_t)sbuf->st_size - in stm32image_set_header() 135 cpu_to_le32(stm32image_checksum(ptr, sbuf->st_size)); in stm32image_set_header()
|
A D | gpimage.c | 56 gph_set_header(gph, sbuf->st_size - GPIMAGE_HDR_SIZE, params->addr, 1); in gpimage_set_header()
|
A D | omapimage.c | 147 gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE, in omapimage_set_header() 155 DIV_ROUND_UP(sbuf->st_size, sizeof(uint32_t)); in omapimage_set_header()
|
A D | imx8mimage.c | 270 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0); in copy_file() 277 size = sbuf.st_size - datafile_offset; in copy_file() 313 munmap((void *)ptr, sbuf.st_size); in copy_file() 451 file_off += ALIGN_IMX(sbuf.st_size, in build_image() 484 ALIGN_IMX(sbuf.st_size + sizeof(imx_header_v3_t) + ivt_offset, in build_image() 531 file_off += sbuf.st_size + sizeof(image_header_t); in build_image()
|
A D | imximage.c | 581 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); in copy_plugin_code() 589 if (sbuf.st_size > MAX_PLUGIN_CODE_SIZE) { in copy_plugin_code() 594 memcpy(plugin_buf, ptr, sbuf.st_size); in copy_plugin_code() 595 imximage_plugin_size = sbuf.st_size; in copy_plugin_code() 597 (void) munmap((void *)ptr, sbuf.st_size); in copy_plugin_code() 880 *header_size_ptr = ROUND((sbuf->st_size + imximage_ivt_offset), 4096); in imximage_set_header() 978 pad_len = ROUND(sbuf.st_size, 4096) - sbuf.st_size; in imximage_generate()
|
A D | fit_info.c | 104 (void) munmap((void *)fit_blob, fsbuf.st_size); in main()
|
A D | ubsha1.c | 44 len = sbuf.st_size; in main()
|
A D | prelink-riscv.c | 94 mmap(0, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main()
|
A D | kwbimage.c | 987 s.st_size + in image_headersz_v1() 1054 s.st_size; in add_binary_header_v1() 1075 ret = fread(cur, s.st_size, 1, bin); in add_binary_header_v1() 1085 cur += ALIGN(s.st_size, 4); in add_binary_header_v1() 1551 sbuf->st_size = ALIGN(sbuf->st_size, 4); in kwbimage_set_header() 1561 image = image_create_v0(&headersz, params, sbuf->st_size); in kwbimage_set_header() 1565 image = image_create_v1(&headersz, params, ptr, sbuf->st_size); in kwbimage_set_header() 1584 cpu_to_le32(image_checksum32((uint32_t *)ptr, sbuf->st_size)); in kwbimage_set_header() 1592 sbuf->st_size += sizeof(uint32_t); in kwbimage_set_header()
|
A D | mips-relocs.c | 225 elf = mmap(NULL, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); in main() 405 err = msync(elf, st.st_size, MS_SYNC); in main() 413 munmap(elf, st.st_size); in main()
|
/u-boot/include/linux/ |
A D | stat.h | 55 off_t st_size; /* file size in # of bytes */ member 83 unsigned long st_size; member 110 off_t st_size; member 139 unsigned long st_size; member
|
/u-boot/scripts/basic/ |
A D | fixdep.c | 304 buf = malloc(st.st_size + 1); in read_file() 309 if (read(fd, buf, st.st_size) != st.st_size) { in read_file() 313 buf[st.st_size] = '\0'; in read_file()
|
/u-boot/scripts/dtc/ |
A D | fstree.c | 63 st.st_size)); in read_fstree()
|