*参照元 [#fd855da4] #backlinks *説明 [#re9e1d9b] -パス: [[linux-2.6.33/fs/read_write.c]] -FIXME: これは何? --説明 **引数 [#l65437c2] -unsigned int fd -- -char __user *buf -- --[[linux-2.6.33/__user]] -size_t count -- **返り値 [#m97e8054] -ssize_t -- **参考 [#q92d2138] *実装 [#b9075d59] SYSCALL_DEFINE3(read, unsigned int, fd, char __user *, buf, size_t, count) { -[[linux-2.6.33/SYSCALL_DEFINE3()]] -- struct file *file; ssize_t ret = -EBADF; int fput_needed; -[[linux-2.6.33/file]] -- file = fget_light(fd, &fput_needed); -[[linux-2.6.33/fget_light()]] -- if (file) { loff_t pos = file_pos_read(file); ret = vfs_read(file, buf, count, &pos); file_pos_write(file, pos); fput_light(file, fput_needed); } -[[linux-2.6.33/file_pos_read()]] -- -[[linux-2.6.33/vfs_read()]] -- -[[linux-2.6.33/file_pos_write()]] -- -[[linux-2.6.33/fput_light()]] -- return ret; } *コメント [#z5353562]