Lines Matching refs:sbuf
411 struct stat sbuf;
423 if (fstat(ifd, &sbuf) < 0) {
428 params.file_size = sbuf.st_size;
469 struct stat sbuf;
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, tparams, ¶ms);
594 (void) munmap((void *)ptr, sbuf.st_size);
617 if (fstat(dfd, &sbuf) < 0) {
624 params.file_size = sbuf.st_size + tparams->header_size;
660 if (stat (file, &sbuf) < 0) {
665 size = cpu_to_uimage (sbuf.st_size);
768 if (fstat(ifd, &sbuf) < 0) {
773 params.file_size = sbuf.st_size;
775 map_len = sbuf.st_size;
785 tparams->set_header (ptr, &sbuf, ifd, ¶ms);
829 struct stat sbuf;
850 if (fstat(dfd, &sbuf) < 0) {
856 if (sbuf.st_size == 0) {
862 ptr = mmap(0, sbuf.st_size, PROT_READ, MAP_SHARED, dfd, 0);
879 if ((unsigned)sbuf.st_size < tparams->header_size) {
898 size = sbuf.st_size - offset;
937 (void) munmap((void *)ptr, sbuf.st_size);