Lines Matching refs:buffer
40 char *buffer;
47 char *buffer;
262 ctx->buffer = malloc(partition->erase_size);
263 if (ctx->buffer == NULL) {
272 free(ctx->buffer);
336 memcpy(data + read, ctx->buffer + ctx->consumed, copy);
341 // Read complete blocks directly into the user's buffer
352 // Read the next block into the buffer
354 if (read_block(ctx->partition, ctx->fd, ctx->buffer)) return -1;
365 free(ctx->buffer);
378 ctx->buffer = malloc(partition->erase_size);
379 if (ctx->buffer == NULL) {
388 free(ctx->buffer);
484 memcpy(ctx->buffer + ctx->stored, data + wrote, copy);
491 if (write_block(ctx, ctx->buffer)) return -1;
495 // Write complete blocks directly from the user's buffer
510 memset(ctx->buffer + ctx->stored, 0, zero);
511 if (write_block(ctx, ctx->buffer)) return -1;
553 free(ctx->buffer);