Lines Matching refs:sbuf
180 struct stat sbuf; in ais_alloc_buffer() local
191 if (fstat(dfd, &sbuf) < 0) { in ais_alloc_buffer()
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()
223 struct stat sbuf; in ais_copy_image() local
234 if (fstat(dfd, &sbuf) < 0) { in ais_copy_image()
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()
385 static void aisimage_set_header(void *ptr, struct stat *sbuf, int ifd, in aisimage_set_header() argument