Lines Matching refs:fpos
184 static ssize_t __read_vmcore(char *buffer, size_t buflen, loff_t *fpos, in __read_vmcore() argument
192 if (buflen == 0 || *fpos >= vmcore_size) in __read_vmcore()
196 if (buflen > vmcore_size - *fpos) in __read_vmcore()
197 buflen = vmcore_size - *fpos; in __read_vmcore()
200 if (*fpos < elfcorebuf_sz) { in __read_vmcore()
201 tsz = min(elfcorebuf_sz - (size_t)*fpos, buflen); in __read_vmcore()
202 if (copy_to(buffer, elfcorebuf + *fpos, tsz, userbuf)) in __read_vmcore()
205 *fpos += tsz; in __read_vmcore()
215 if (*fpos < elfcorebuf_sz + elfnotes_sz) { in __read_vmcore()
218 tsz = min(elfcorebuf_sz + elfnotes_sz - (size_t)*fpos, buflen); in __read_vmcore()
219 kaddr = elfnotes_buf + *fpos - elfcorebuf_sz; in __read_vmcore()
223 *fpos += tsz; in __read_vmcore()
233 if (*fpos < m->offset + m->size) { in __read_vmcore()
235 m->offset + m->size - *fpos, in __read_vmcore()
237 start = m->paddr + *fpos - m->offset; in __read_vmcore()
242 *fpos += tsz; in __read_vmcore()
256 size_t buflen, loff_t *fpos) in read_vmcore() argument
258 return __read_vmcore((__force char *) buffer, buflen, fpos, 1); in read_vmcore()