Lines Matching defs:buffer
108 void *buffer;
131 /* generate image and return it as image->buffer.
132 * size of the buffer returned as image->image_size.
139 /* it cleans the buffer allocated during image creation.
231 /* Loads file content into buffer. Returns NULL on error. */
234 void *buffer;
240 // In this case we read whole image into memory buffer.
241 buffer = malloc(size);
242 if (!buffer) {
249 ssize_t actually_read = read(fd, (char*)buffer+count, size-count);
259 free(buffer);
266 buffer = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
267 if (buffer == MAP_FAILED) {
273 return buffer;
279 free(image->buffer);
281 munmap(image->buffer, image->image_size);
312 image->buffer = load_buffer(fd, st.st_size);
374 if (!image.buffer) {
382 status = fb_download_data(usb, image.buffer, image.image_size);