]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
vc: switch to fixed_size_llseek()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 17 Jun 2013 11:31:22 +0000 (15:31 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 29 Jun 2013 08:57:30 +0000 (12:57 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/tty/vt/vc_screen.c

index d7799deacb21a66805d8e4308bcc199b64894fbf..14a2b5f11bcab9739ea6bc23c5bb4134f1b37f1c 100644 (file)
@@ -188,22 +188,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
        console_unlock();
        if (size < 0)
                return size;
-       switch (orig) {
-               default:
-                       return -EINVAL;
-               case 2:
-                       offset += size;
-                       break;
-               case 1:
-                       offset += file->f_pos;
-               case 0:
-                       break;
-       }
-       if (offset < 0 || offset > size) {
-               return -EINVAL;
-       }
-       file->f_pos = offset;
-       return file->f_pos;
+       return fixed_size_llseek(file, offset, orig, size);
 }