Searched refs:st_size (Results 1 - 25 of 49) sorted by relevance

12

/u-boot/tools/gdb/
H A Dgdbsend.c85 if ((image = (char *)malloc(ist.st_size)) == NULL)
86 Perror("can't allocate %ld bytes for image", ist.st_size);
88 if ((c = read(ifd, image, ist.st_size)) < 0)
89 Perror("read of %d bytes from '%s' failed", ist.st_size, ifn);
91 if (c != ist.st_size)
92 Error("read of %ld bytes from '%s' failed (%d)", ist.st_size, ifn, c);
105 remote_write_bytes(addr, image, ist.st_size);
/u-boot/include/linux/
H A Dstat.h55 off_t st_size; /* file size in # of bytes */ member in struct:stat
83 unsigned long st_size; member in struct:stat
110 off_t st_size; member in struct:stat
139 unsigned long st_size; member in struct:stat
/u-boot/tools/
H A Dfit_check_sign.c95 (void) munmap((void *)fit_blob, fsbuf.st_size);
96 (void) munmap((void *)key_blob, ksbuf.st_size);
H A Ddumpimage.c35 sbuf->st_size, &params);
160 if (tparams && (uint32_t)sbuf.st_size < tparams->header_size) {
166 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0);
196 (void)munmap((void *)ptr, sbuf.st_size);
H A Dgpimage.c56 gph_set_header(gph, sbuf->st_size - GPIMAGE_HDR_SIZE, params->addr, 1);
H A Dfit_common.c82 sbuf->st_size += size_inc;
83 if (ftruncate(fd, sbuf->st_size)) {
91 ptr = mmap(0, sbuf->st_size,
110 ret = fdt_open_into(ptr, ptr, sbuf->st_size);
H A Dprelink-riscv.c94 mmap(0, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
121 munmap(data, st.st_size);
H A Daisimage.c204 ais_img_size = ALIGN(sbuf.st_size, WORD_ALIGN0) + MAX_CMD_BUFFER;
205 ptr = (uint32_t *)malloc(ALIGN(sbuf.st_size, WORD_ALIGN0)
240 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
243 *aisptr++ = sbuf.st_size;
244 memcpy((void *)aisptr, ptr, sbuf.st_size);
245 aisptr += ALIGN(sbuf.st_size, WORD_ALIGN0) / sizeof(uint32_t);
247 (void) munmap((void *)ptr, sbuf.st_size);
H A Dimagetool.c60 sbuf->st_size, params);
98 sbuf->st_size, params);
173 return sbuf.st_size;
H A Ddefault_image.c124 sbuf->st_size - sizeof(struct legacy_img_hdr));
132 imagesize = sbuf->st_size - sizeof(struct legacy_img_hdr)
136 imagesize = sbuf->st_size - sizeof(struct legacy_img_hdr);
H A Dstm32image.c132 stm32hdr->image_length = cpu_to_le32((uint32_t)sbuf->st_size -
135 cpu_to_le32(stm32image_checksum(ptr, sbuf->st_size));
H A Dfit_info.c104 (void) munmap((void *)fit_blob, fsbuf.st_size);
H A Dimx8image.c335 if (sbuf.st_size == 0)
338 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
345 size = sbuf.st_size;
365 munmap((void *)ptr, sbuf.st_size);
395 if (sbuf.st_size == 0)
398 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
405 size = sbuf.st_size;
442 munmap((void *)ptr, sbuf.st_size);
465 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
473 munmap((void *)ptr, sbuf.st_size);
[all...]
H A Dmkimage.c428 params.file_size = sbuf.st_size;
568 } else if (tparams && sbuf.st_size < (off_t)tparams->header_size) {
572 (unsigned long long) sbuf.st_size,
576 size = sbuf.st_size;
594 (void) munmap((void *)ptr, sbuf.st_size);
624 params.file_size = sbuf.st_size + tparams->header_size;
665 size = cpu_to_uimage (sbuf.st_size);
773 params.file_size = sbuf.st_size;
775 map_len = sbuf.st_size;
856 if (sbuf.st_size
[all...]
H A Domapimage.c147 gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE,
155 DIV_ROUND_UP(sbuf->st_size, sizeof(uint32_t));
H A Dfdt_add_pubkey.c97 munmap(dest_blob, dest_sbuf.st_size);
H A Dmkeficapsule.c134 if (bin_stat.st_size > SIZE_MAX) {
139 buf = malloc(bin_stat.st_size);
142 (size_t)bin_stat.st_size);
147 size = fread(buf, 1, bin_stat.st_size, g);
148 if (size < bin_stat.st_size) {
155 *bin_size = bin_stat.st_size;
840 if ((ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, fd, 0))
H A Dfit_image.c54 destfd_size = dest_sbuf.st_size;
92 munmap(ptr, sbuf.st_size);
153 ret = fdt_property_placeholder(fdt, "data", sbuf.st_size, &ptr);
156 ret = read(fd, ptr, sbuf.st_size);
157 if (ret != sbuf.st_size) {
576 munmap(fdt, sbuf.st_size);
613 munmap(fdt, sbuf.st_size);
639 size = sbuf.st_size + 16384;
698 munmap(old_fdt, sbuf.st_size);
728 munmap(old_fdt, sbuf.st_size);
[all...]
H A Dimx8mimage.c270 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
277 size = sbuf.st_size - datafile_offset;
313 munmap((void *)ptr, sbuf.st_size);
521 file_off += ALIGN_IMX(sbuf.st_size,
568 ALIGN_IMX(sbuf.st_size + sizeof(imx_header_v3_t) + ivt_offset,
607 file_off += sbuf.st_size + sizeof(struct legacy_img_hdr);
H A Dmips-relocs.c225 elf = mmap(NULL, st.st_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
406 err = msync(elf, st.st_size, MS_SYNC);
414 munmap(elf, st.st_size);
H A Dlpc32xximage.c146 int image_size_in_pages = ((sbuf->st_size
H A Dimximage.c581 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0);
589 if (sbuf.st_size > MAX_PLUGIN_CODE_SIZE) {
594 memcpy(plugin_buf, ptr, sbuf.st_size);
595 imximage_plugin_size = sbuf.st_size;
597 (void) munmap((void *)ptr, sbuf.st_size);
880 *header_size_ptr = ROUND((sbuf->st_size + imximage_ivt_offset), 4096);
1041 pad_len = ROUND(sbuf.st_size, 4096) - sbuf.st_size;
H A Drkcommon.c641 (int)sbuf.st_size, padded_size);
643 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
650 size = sbuf.st_size;
657 munmap((void *)ptr, sbuf.st_size);
662 munmap((void *)ptr, sbuf.st_size);
/u-boot/scripts/dtc/
H A Dfstree.c63 st.st_size));
/u-boot/scripts/basic/
H A Dfixdep.c300 buf = malloc(st.st_size + 1);
305 if (read(fd, buf, st.st_size) != st.st_size) {
309 buf[st.st_size] = '\0';

Completed in 324 milliseconds

12