Lines Matching refs:buf
1872 * small helper routine , copy contents to buf from addr.
1876 static int aligned_vread(char *buf, char *addr, unsigned long count)
1902 memcpy(buf, map + offset, length);
1905 memset(buf, 0, length);
1908 buf += length;
1915 static int aligned_vwrite(char *buf, char *addr, unsigned long count)
1941 memcpy(map + offset, buf, length);
1945 buf += length;
1954 * @buf: buffer for reading data
1958 * Returns # of bytes which addr and buf should be increased.
1965 * proper area of @buf. If there are memory holes, they'll be zero-filled.
1969 * vm_struct area, returns 0. @buf should be kernel's buffer.
1978 long vread(char *buf, char *addr, unsigned long count)
1982 char *vaddr, *buf_start = buf;
2005 *buf = '\0';
2006 buf++;
2014 aligned_vread(buf, addr, n);
2016 memset(buf, 0, n);
2017 buf += n;
2024 if (buf == buf_start)
2027 if (buf != buf_start + buflen)
2028 memset(buf, 0, buflen - (buf - buf_start));
2035 * @buf: buffer for source data
2039 * Returns # of bytes which addr and buf should be incresed.
2047 * proper area of @buf. If there are memory holes, no copy to hole.
2051 * vm_struct area, returns 0. @buf should be kernel's buffer.
2059 long vwrite(char *buf, char *addr, unsigned long count)
2087 buf++;
2095 aligned_vwrite(buf, addr, n);
2098 buf += n;