Lines Matching refs:count
56 static ssize_t blk_fops_read(struct dfs_file *file, void *buf, size_t count, off_t *pos) in blk_fops_read() argument
77 if (count > bytes_per_sector - first_offs) in blk_fops_read()
83 rsize = count; in blk_fops_read()
91 while (rsize < count) in blk_fops_read()
100 if (count - rsize >= bytes_per_sector) in blk_fops_read()
107 rt_memcpy(buf + rsize, rbuf, count - rsize); in blk_fops_read()
108 rsize = count; in blk_fops_read()
121 static ssize_t blk_fops_write(struct dfs_file *file, const void *buf, size_t count, off_t *pos) in blk_fops_write() argument
138 if (count > bytes_per_sector - first_offs) in blk_fops_write()
144 wsize = count; in blk_fops_write()
175 if ((count - wsize) / bytes_per_sector != 0) in blk_fops_write()
177 res = rt_device_write(dev, blk_pos, buf + wsize, (count - wsize) / bytes_per_sector); in blk_fops_write()
181 if (res != (count - wsize) / bytes_per_sector) in blk_fops_write()
191 if ((count - wsize) != 0) in blk_fops_write()
199 rt_memcpy(rbuf, buf + wsize, count - wsize); in blk_fops_write()
204 wsize += count - wsize; in blk_fops_write()