Lines Matching refs:sbuf
28 static void imx8image_set_header(void *ptr, struct stat *sbuf, int ifd,
286 static void check_file(struct stat *sbuf, char *filename)
296 if (fstat(tmp_fd, sbuf) < 0) {
309 struct stat sbuf;
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;
389 if (fstat(dfd, &sbuf) < 0) {
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);
450 struct stat sbuf;
460 if (fstat(dfd, &sbuf) < 0) {
465 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
473 munmap((void *)ptr, sbuf.st_size);
825 struct stat sbuf;
872 check_file(&sbuf, img_sp->filename);
876 ALIGN(sbuf.st_size, sector_size),
880 file_off += ALIGN(sbuf.st_size, sector_size);
889 check_file(&sbuf, img_sp->filename);
895 sbuf.st_size,
899 file_off += sbuf.st_size;