Lines Matching refs:buf
101 if (!m->buf) { in traverse()
102 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in traverse()
103 if (!m->buf) in traverse()
136 kvfree(m->buf); in traverse()
138 m->buf = seq_buf_alloc(m->size <<= 1); in traverse()
139 return !m->buf ? -ENOMEM : -EAGAIN; in traverse()
151 ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) in seq_read() argument
153 struct iovec iov = { .iov_base = buf, .iov_len = size}; in seq_read()
209 if (!m->buf) { in seq_read_iter()
210 m->buf = seq_buf_alloc(m->size = PAGE_SIZE); in seq_read_iter()
211 if (!m->buf) in seq_read_iter()
216 n = copy_to_iter(m->buf + m->from, m->count, iter); in seq_read_iter()
243 kvfree(m->buf); in seq_read_iter()
245 m->buf = seq_buf_alloc(m->size <<= 1); in seq_read_iter()
246 if (!m->buf) in seq_read_iter()
281 n = copy_to_iter(m->buf, m->count, iter); in seq_read_iter()
355 kvfree(m->buf); in seq_release()
373 char *buf; in seq_escape() local
374 size_t size = seq_get_buf(m, &buf); in seq_escape()
377 ret = string_escape_str(s, buf, size, ESCAPE_OCTAL, esc); in seq_escape()
384 char *buf; in seq_escape_mem_ascii() local
385 size_t size = seq_get_buf(m, &buf); in seq_escape_mem_ascii()
388 ret = string_escape_mem_ascii(src, isz, buf, size); in seq_escape_mem_ascii()
398 len = vsnprintf(m->buf + m->count, m->size - m->count, f, args); in seq_vprintf()
461 char *buf; in seq_path() local
462 size_t size = seq_get_buf(m, &buf); in seq_path()
466 char *p = d_path(path, buf, size); in seq_path()
468 char *end = mangle_path(buf, p, esc); in seq_path()
470 res = end - buf; in seq_path()
499 char *buf; in seq_path_root() local
500 size_t size = seq_get_buf(m, &buf); in seq_path_root()
506 p = __d_path(path, root, buf, size); in seq_path_root()
511 char *end = mangle_path(buf, p, esc); in seq_path_root()
513 res = end - buf; in seq_path_root()
528 char *buf; in seq_dentry() local
529 size_t size = seq_get_buf(m, &buf); in seq_dentry()
533 char *p = dentry_path(dentry, buf, size); in seq_dentry()
535 char *end = mangle_path(buf, p, esc); in seq_dentry()
537 res = end - buf; in seq_dentry()
585 char *buf = seq_buf_alloc(size); in single_open_size() local
587 if (!buf) in single_open_size()
591 kvfree(buf); in single_open_size()
594 ((struct seq_file *)file->private_data)->buf = buf; in single_open_size()
657 m->buf[m->count++] = c; in seq_putc()
669 memcpy(m->buf + m->count, s, len); in seq_puts()
707 len = num_to_str(m->buf + m->count, m->size - m->count, num, width); in seq_put_decimal_ull_width()
765 m->buf[m->count + i] = hex_asc[0xf & v]; in seq_put_hex_ll()
789 m->buf[m->count++] = '-'; in seq_put_decimal_ll()
794 m->buf[m->count++] = num + '0'; in seq_put_decimal_ll()
798 len = num_to_str(m->buf + m->count, m->size - m->count, num, 0); in seq_put_decimal_ll()
821 memcpy(seq->buf + seq->count, data, len); in seq_write()
843 memset(m->buf + m->count, ' ', size); in seq_pad()
853 int rowsize, int groupsize, const void *buf, size_t len, in seq_hex_dump() argument
856 const u8 *ptr = buf; in seq_hex_dump()