Lines Matching refs:data
282 static int read_block(const MtdPartition *partition, int fd, char *data) in read_block() argument
301 TEMP_FAILURE_RETRY(read(fd, data, size)) != size) { in read_block()
328 ssize_t mtd_read_data(MtdReadContext *ctx, char *data, size_t len) in mtd_read_data() argument
335 memcpy(data + read, ctx->buffer + ctx->consumed, copy); in mtd_read_data()
343 if (read_block(ctx->partition, ctx->fd, data + read)) return -1; in mtd_read_data()
406 static int write_block(MtdWriteContext *ctx, const char *data) in write_block() argument
441 TEMP_FAILURE_RETRY(write(fd, data, size)) != size) { in write_block()
453 if (memcmp(data, verify, size) != 0) { in write_block()
478 ssize_t mtd_write_data(MtdWriteContext *ctx, const char *data, size_t len) in mtd_write_data() argument
486 memcpy(ctx->buffer + ctx->stored, data + wrote, copy); in mtd_write_data()
499 if (write_block(ctx, data + wrote)) return -1; in mtd_write_data()