提交 80de7f7a 编写于 作者: C Cyrill Gorcunov 提交者: Linus Torvalds

seq-file: use SEEK_ macros instead of hardcoded numbers

Signed-off-by: NCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 80d26af8
......@@ -308,9 +308,9 @@ loff_t seq_lseek(struct file *file, loff_t offset, int whence)
mutex_lock(&m->lock);
m->version = file->f_version;
switch (whence) {
case 1:
case SEEK_CUR:
offset += file->f_pos;
case 0:
case SEEK_SET:
if (offset < 0)
break;
retval = offset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册