Lines Matching refs:off
29 offset_t off, offset_t len)
34 if (off >= buf_len) {
39 if (off + len > buf_len) {
40 memset(out + (buf_len - off), 0, len - (buf_len - off));
41 len = buf_len - off;
44 assert(off < buf_len);
45 assert(off + len <= buf_len);
47 memcpy(out, buf + off, len);
72 static int file_read(struct file *f, char *buf, offset_t off, offset_t len)
81 if (off >= UINT32_MAX) {
84 f->path, off, len);
88 if (off + len > UINT32_MAX) {
91 f->path, off, len);
92 len = UINT32_MAX - off;
97 f->path, off, len);
110 f->path, off, len, strerror(errno));
117 f->path, off, len, strerror(errno));
126 static int dir_read(struct dir *d, char *buf, offset_t off, offset_t len)
131 return buffer_read((char*)d->entries, d->size, buf, off, len);
135 offset_t off, offset_t len)
144 off, len);
147 off, len);
150 off, len);
152 return file_read((struct file *)e, buf, off, len);
154 return dir_read((struct dir *)e, buf, off, len);