/u-boot/tools/ |
H A D | dumpimage.c | 29 void *ptr, struct stat *sbuf) 35 sbuf->st_size, ¶ms); 68 struct stat sbuf; local 154 if (fstat(ifd, &sbuf) < 0) { 160 if (tparams && (uint32_t)sbuf.st_size < tparams->header_size) { 166 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, ifd, 0); 183 retval = dumpimage_extract_subimage(tparams, ptr, &sbuf); 192 retval = imagetool_verify_print_header(ptr, &sbuf, tparams, 196 (void)munmap((void *)ptr, sbuf.st_size); 28 dumpimage_extract_subimage(struct image_type_params *tparams, void *ptr, struct stat *sbuf) argument
|
H A D | imagetool.c | 31 struct stat *sbuf, 37 struct stat *sbuf, 49 return imagetool_verify_print_header_by_type(ptr, sbuf, tparams, params); 60 sbuf->st_size, params); 90 struct stat *sbuf, 98 sbuf->st_size, params); 155 struct stat sbuf; local 165 if (fstat(fd, &sbuf) < 0) { 173 return sbuf.st_size; 35 imagetool_verify_print_header( void *ptr, struct stat *sbuf, struct image_type_params *tparams, struct image_tool_params *params) argument 88 imagetool_verify_print_header_by_type( void *ptr, struct stat *sbuf, struct image_type_params *tparams, struct image_tool_params *params) argument
|
H A D | gpimage.c | 51 static void gpimage_set_header(void *ptr, struct stat *sbuf, int ifd, argument 56 gph_set_header(gph, sbuf->st_size - GPIMAGE_HDR_SIZE, params->addr, 1);
|
H A D | rkimage.c | 15 static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, argument
|
H A D | fit_common.h | 35 * @sbuf: File status information is stored here 41 void **blobp, struct stat *sbuf, bool delete_on_error,
|
H A D | fit_common.c | 60 void **blobp, struct stat *sbuf, bool delete_on_error, 75 if (fstat(fd, sbuf) < 0) { 82 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); 59 mmap_fdt(const char *cmdname, const char *fname, size_t size_inc, void **blobp, struct stat *sbuf, bool delete_on_error, bool read_only) argument
|
H A D | aisimage.c | 180 struct stat sbuf; local 191 if (fstat(dfd, &sbuf) < 0) { 204 ais_img_size = ALIGN(sbuf.st_size, WORD_ALIGN0) + MAX_CMD_BUFFER; 205 ptr = (uint32_t *)malloc(ALIGN(sbuf.st_size, WORD_ALIGN0) 223 struct stat sbuf; local 234 if (fstat(dfd, &sbuf) < 0) { 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 385 aisimage_set_header(void *ptr, struct stat *sbuf, int ifd, struct image_tool_params *params) argument [all...] |
H A D | rkcommon.h | 51 void rkcommon_set_header(void *buf, struct stat *sbuf, int ifd,
|
H A D | rkspi.c | 19 static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd, argument 27 rkcommon_set_header(buf, sbuf, ifd, params);
|
H A D | default_image.c | 110 static void image_set_header(void *ptr, struct stat *sbuf, int ifd, argument 124 sbuf->st_size - sizeof(struct legacy_img_hdr)); 126 time = imagetool_get_source_date(params->cmdname, sbuf->st_mtime); 132 imagesize = sbuf->st_size - sizeof(struct legacy_img_hdr) 136 imagesize = sbuf->st_size - sizeof(struct legacy_img_hdr);
|
H A D | stm32image.c | 123 static void stm32image_set_header(void *ptr, struct stat *sbuf, int ifd, argument 132 stm32hdr->image_length = cpu_to_le32((uint32_t)sbuf->st_size - 135 cpu_to_le32(stm32image_checksum(ptr, sbuf->st_size));
|
H A D | imx8image.c | 28 static void imx8image_set_header(void *ptr, struct stat *sbuf, int ifd, argument 286 static void check_file(struct stat *sbuf, char *filename) argument 296 if (fstat(tmp_fd, sbuf) < 0) { 309 struct stat sbuf; local 329 if (fstat(dfd, &sbuf) < 0) { 335 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); 373 struct stat sbuf; local 450 struct stat sbuf; local 825 struct stat sbuf; local [all...] |
H A D | mkimage.c | 411 struct stat sbuf; local 423 if (fstat(ifd, &sbuf) < 0) { 428 params.file_size = sbuf.st_size; 469 struct stat sbuf; local 544 if (fstat(ifd, &sbuf) < 0) { 551 if ((sbuf.st_mode & S_IFMT) == S_IFBLK) { 568 } else if (tparams && sbuf.st_size < (off_t)tparams->header_size) { 572 (unsigned long long) sbuf.st_size, 576 size = sbuf.st_size; 592 retval = imagetool_verify_print_header(ptr, &sbuf, tparam 829 struct stat sbuf; local [all...] |
H A D | imx8mimage.c | 58 static void imx8mimage_set_header(void *ptr, struct stat *sbuf, int ifd, argument 248 struct stat sbuf; local 264 if (fstat(dfd, &sbuf) < 0) { 270 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); 491 struct stat sbuf; local 510 if (fstat(hdmi_fd, &sbuf) < 0) { 521 file_off += ALIGN_IMX(sbuf.st_size, 547 if (fstat(ap_fd, &sbuf) < [all...] |
H A D | omapimage.c | 126 static void omapimage_set_header(void *ptr, struct stat *sbuf, int ifd, argument 147 gph_set_header(gph, sbuf->st_size - OMAP_CH_HDR_SIZE, 155 DIV_ROUND_UP(sbuf->st_size, sizeof(uint32_t));
|
H A D | socfpgaimage.c | 403 struct stat sbuf; local 406 stat(params->datafile, &sbuf) == 0 && 407 sbuf.st_size <= (sfp_max_size(ver) - sizeof(uint32_t))) { 408 data_size = sbuf.st_size; 445 static void socfpgaimage_set_header_v0(void *ptr, struct stat *sbuf, int ifd, argument 451 static void socfpgaimage_set_header_v1(void *ptr, struct stat *sbuf, int ifd, argument
|
H A D | lpc32xximage.c | 139 static void lpc32xximage_set_header(void *ptr, struct stat *sbuf, int ifd, argument 146 int image_size_in_pages = ((sbuf->st_size
|
H A D | fit_image.c | 33 struct stat sbuf; local 37 tfd = mmap_fdt(params->cmdname, tmpfile, size_inc, &ptr, &sbuf, true, 60 sbuf.st_mtime); 92 munmap(ptr, sbuf.st_size); 135 struct stat sbuf; local 147 if (fstat(fd, &sbuf) < 0) { 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) { 502 struct stat sbuf; local 627 struct stat sbuf; local [all...] |
H A D | imximage.c | 562 struct stat sbuf; local 574 if (fstat(ifd, &sbuf) < 0) { 581 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); 834 static void imximage_set_header(void *ptr, struct stat *sbuf, int ifd, argument 880 *header_size_ptr = ROUND((sbuf->st_size + imximage_ivt_offset), 4096); 974 struct stat sbuf; local [all...] |
H A D | rkcommon.c | 357 void rkcommon_set_header(void *buf, struct stat *sbuf, int ifd, argument 619 struct stat sbuf; local 633 if (fstat(dfd, &sbuf) < 0) { 641 (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);
|
H A D | sunxi_egon.c | 106 static void egon_set_header(void *buf, struct stat *sbuf, int infd, argument 164 for (i = 0; i < sbuf->st_size / 4; i++)
|
H A D | mtk_image.c | 732 static void mtk_image_set_header(void *ptr, struct stat *sbuf, int ifd, argument 739 lk->size = cpu_to_le32(sbuf->st_size - sizeof(union lk_hdr)); 748 img_size = sbuf->st_size; 751 mtk_image_set_mt7621_header(ptr, sbuf->st_size, params->addr); 756 mtk_image_set_nand_header(ptr, sbuf->st_size, params->addr); 758 mtk_image_set_gen_header(ptr, sbuf->st_size, params->addr);
|
/u-boot/fs/ubifs/ |
H A D | recovery.c | 109 void *sbuf, *buf; local 111 sbuf = vmalloc(c->leb_size); 112 if (!sbuf) 115 err = ubifs_leb_read(c, lnum, sbuf, 0, c->leb_size, 0); 121 buf = sbuf; 180 *pbuf = sbuf; 186 vfree(sbuf); 624 * @sbuf: LEB-sized buffer to use 634 int offs, void *sbuf, int jhead) 639 void *buf = sbuf 633 ubifs_recover_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf, int jhead) argument 867 ubifs_recover_log_leb(struct ubifs_info *c, int lnum, int offs, void *sbuf) argument 923 recover_head(struct ubifs_info *c, int lnum, int offs, void *sbuf) argument 965 ubifs_recover_inl_heads(struct ubifs_info *c, void *sbuf) argument 993 clean_an_unclean_leb(struct ubifs_info *c, struct ubifs_unclean_leb *ucleb, void *sbuf) argument 1086 ubifs_clean_lebs(struct ubifs_info *c, void *sbuf) argument [all...] |
H A D | scan.c | 126 * @sbuf: scan buffer (must be c->leb_size) 132 int offs, void *sbuf) 145 sleb->buf = sbuf; 147 err = ubifs_leb_read(c, lnum, sbuf + offs, offs, c->leb_size - offs, 0); 250 * @sbuf: scan buffer (must be of @c->leb_size bytes in size) 262 int offs, void *sbuf, int quiet) 264 void *buf = sbuf + offs; 268 sleb = ubifs_start_scan(c, lnum, offs, sbuf); 131 ubifs_start_scan(const struct ubifs_info *c, int lnum, int offs, void *sbuf) argument 261 ubifs_scan(const struct ubifs_info *c, int lnum, int offs, void *sbuf, int quiet) argument
|
/u-boot/boot/ |
H A D | vbe_simple_fw.c | 42 ALLOC_CACHE_ALIGN_BUFFER(u8, sbuf, MMC_MAX_BLOCK_LEN); 67 ret = blk_read(blk, blknum, 1, sbuf); 71 ret = fdt_check_header(sbuf); 74 size = fdt_totalsize(sbuf);
|