Hi, I need to know how many bytes does a sys_read system call when it referenced? I printed the ret. It prints ret=7 ret =7...... is ret shows anything about bytes read?



162 asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count)
163 {
164 ssize_t ret;
165 struct file * file;
166
167 ret = -EBADF;
168 file = fget(fd);
169 if (file) {
170 if (file->f_mode & FMODE_READ) {
171 ret = locks_verify_area(FLOCK_VERIFY_READ, file->f_dentry->d_inode,
172 file, file->f_pos, count);
173 if (!ret) {
174 ssize_t (*read)(struct file *, char *, size_t, loff_t *);
175 ret = -EINVAL;
176 if (file->f_op && (read = file->f_op->read) != NULL)
177 ret = read(file, buf, count, &file->f_pos);
178 }
179 }
180 if (ret > 0)
181 dnotify_parent(file->f_dentry, DN_ACCESS);
182 fput(file);
183 }
184 return ret;
185 }