Lines Matching refs:buffer
107 void *buffer;
130 /* generate image and return it as image->buffer.
131 * size of the buffer returned as image->image_size.
138 /* it cleans the buffer allocated during image creation.
230 /* Loads file content into buffer. Returns NULL on error. */
233 void *buffer;
239 // In this case we read whole image into memory buffer.
240 buffer = malloc(size);
241 if (!buffer) {
248 ssize_t actually_read = read(fd, (char*)buffer+count, size-count);
258 free(buffer);
265 buffer = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fd, 0);
266 if (buffer == MAP_FAILED) {
272 return buffer;
278 free(image->buffer);
280 munmap(image->buffer, image->image_size);
308 image->buffer = load_buffer(fd, st.st_size);
370 if (!image.buffer) {
378 status = fb_download_data(usb, image.buffer, image.image_size);