Lines Matching defs:count
32 size_t count;
61 ssize_t count = -ENOENT;
70 count = buffer->attr->show(buffer->item, buffer->page);
73 if (count < 0)
74 return count;
75 if (WARN_ON_ONCE(count > (ssize_t)SIMPLE_ATTR_SIZE))
78 buffer->count = count;
86 * @count: number of bytes to read.
102 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos)
113 pr_debug("%s: count = %zd, ppos = %lld, buf = %s\n",
114 __func__, count, *ppos, buffer->page);
115 retval = simple_read_from_buffer(buf, count, ppos, buffer->page,
116 buffer->count);
126 * @count: number of bytes to read.
144 size_t count, loff_t *ppos)
149 ssize_t len = min_t(size_t, count, PAGE_SIZE);
205 retval = simple_read_from_buffer(buf, count, ppos, buffer->bin_buffer,
217 * @count: number of bytes in @userbuf.
224 fill_write_buffer(struct configfs_buffer * buffer, const char __user * buf, size_t count)
233 if (count >= SIMPLE_ATTR_SIZE)
234 count = SIMPLE_ATTR_SIZE - 1;
235 error = copy_from_user(buffer->page,buf,count);
239 buffer->page[count] = 0;
240 return error ? -EFAULT : count;
244 flush_write_buffer(struct file *file, struct configfs_buffer *buffer, size_t count)
251 res = buffer->attr->store(buffer->item, buffer->page, count);
261 * @count: number of bytes
275 configfs_write_file(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
281 len = fill_write_buffer(buffer, buf, count);
294 * @count: number of bytes
305 size_t count, loff_t *ppos)
321 if (*ppos + count > buffer->bin_buffer_size) {
324 *ppos + count > buffer->cb_max_size) {
329 tbuf = vmalloc(*ppos + count);
344 *ppos + count - buffer->bin_buffer_size);
346 buffer->bin_buffer_size = *ppos + count;
350 buffer->bin_buffer_size, ppos, buf, count);