Lines Matching defs:read
105 /* Open and read the file contents.
111 nbytes = read(fd, buf, sizeof(buf) - 1);
210 printf("Mount %s on %s read-only\n", devname, mount_point);
302 if (lseek64(fd, pos, SEEK_SET) != pos || read(fd, data, size) != size) {
303 printf("mtd: read error at 0x%08llx (%s)\n",
312 // copy the comparison baseline for the next read.
331 size_t read = 0;
332 while (read < len) {
335 size_t copy = len - read < avail ? len - read : avail;
336 memcpy(data + read, ctx->buffer + ctx->consumed, copy);
338 read += copy;
343 len - read >= ctx->partition->erase_size) {
344 if (read_block(ctx->partition, ctx->fd, data + read)) return -1;
345 read += ctx->partition->erase_size;
348 if (read >= len) {
349 return read;
353 if (ctx->consumed == ctx->partition->erase_size && read < len) {
359 return read;
446 read(fd, verify, size) != size) {
447 printf("mtd: re-read error at 0x%08lx (%s)\n",