Lines Matching refs:fpos
299 static ssize_t __read_vmcore(char *buffer, size_t buflen, loff_t *fpos, in __read_vmcore() argument
307 if (buflen == 0 || *fpos >= vmcore_size) in __read_vmcore()
311 if (buflen > vmcore_size - *fpos) in __read_vmcore()
312 buflen = vmcore_size - *fpos; in __read_vmcore()
315 if (*fpos < elfcorebuf_sz) { in __read_vmcore()
316 tsz = min(elfcorebuf_sz - (size_t)*fpos, buflen); in __read_vmcore()
317 if (copy_to(buffer, elfcorebuf + *fpos, tsz, userbuf)) in __read_vmcore()
320 *fpos += tsz; in __read_vmcore()
330 if (*fpos < elfcorebuf_sz + elfnotes_sz) { in __read_vmcore()
344 if (*fpos < elfcorebuf_sz + vmcoredd_orig_sz) { in __read_vmcore()
346 (size_t)*fpos, buflen); in __read_vmcore()
347 start = *fpos - elfcorebuf_sz; in __read_vmcore()
352 *fpos += tsz; in __read_vmcore()
363 tsz = min(elfcorebuf_sz + elfnotes_sz - (size_t)*fpos, buflen); in __read_vmcore()
364 kaddr = elfnotes_buf + *fpos - elfcorebuf_sz - vmcoredd_orig_sz; in __read_vmcore()
369 *fpos += tsz; in __read_vmcore()
379 if (*fpos < m->offset + m->size) { in __read_vmcore()
381 m->offset + m->size - *fpos, in __read_vmcore()
383 start = m->paddr + *fpos - m->offset; in __read_vmcore()
389 *fpos += tsz; in __read_vmcore()
403 size_t buflen, loff_t *fpos) in read_vmcore() argument
405 return __read_vmcore((__force char *) buffer, buflen, fpos, 1); in read_vmcore()