Lines Matching refs:count

289 static ssize_t dfs_tmpfs_read(struct dfs_file *file, void *buf, size_t count, off_t *pos)  in dfs_tmpfs_read()  argument
298 if ((ssize_t)count < size - *pos) in dfs_tmpfs_read()
299 length = count; in dfs_tmpfs_read()
314 static ssize_t _dfs_tmpfs_write(struct tmpfs_file *d_file, const void *buf, size_t count, off_t *po… in _dfs_tmpfs_write() argument
323 if (count + *pos > d_file->size) in _dfs_tmpfs_write()
326 ptr = rt_realloc(d_file->data, *pos + count); in _dfs_tmpfs_write()
334 superblock->df_size += (*pos - d_file->size + count); in _dfs_tmpfs_write()
338 d_file->size = *pos + count; in _dfs_tmpfs_write()
342 if (count > 0) in _dfs_tmpfs_write()
343 memcpy(d_file->data + *pos, buf, count); in _dfs_tmpfs_write()
346 *pos += count; in _dfs_tmpfs_write()
348 return count; in _dfs_tmpfs_write()
351 static ssize_t dfs_tmpfs_write(struct dfs_file *file, const void *buf, size_t count, off_t *pos) in dfs_tmpfs_write() argument
360 count = _dfs_tmpfs_write(d_file, buf, count, pos); in dfs_tmpfs_write()
364 return count; in dfs_tmpfs_write()
496 uint32_t count) in dfs_tmpfs_getdents() argument
512 count = (count / sizeof(struct dirent)); in dfs_tmpfs_getdents()
513 if (count == 0) in dfs_tmpfs_getdents()
519 end = file->fpos + count; in dfs_tmpfs_getdents()
521 count = 0; in dfs_tmpfs_getdents()
527 d = dirp + count; in dfs_tmpfs_getdents()
540 count += 1; in dfs_tmpfs_getdents()
551 return count * sizeof(struct dirent); in dfs_tmpfs_getdents()
802 size_t count = 0; in dfs_tmp_page_write() local
817 count = _dfs_tmpfs_write(d_file, page->page, page->len, &pos); in dfs_tmp_page_write()
821 return count; in dfs_tmp_page_write()