mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
lseek(fd, n, SEEK_END) does *not* go to eof - n
When you copy some code, you are supposed to read it. If nothing else, there's a chance to spot and fix an obvious bug instead of sharing it... X-Song: "I Got It From Agnes", by Tom Lehrer Signed-off-by: Al Viro <[email protected]> [ Tom Lehrer? You're dating yourself, Al ] Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7d13205581
commit
8177a9d79c
4 changed files with 4 additions and 4 deletions
|
|
@ -244,7 +244,7 @@ bnad_debugfs_lseek(struct file *file, loff_t offset, int orig)
|
|||
file->f_pos += offset;
|
||||
break;
|
||||
case 2:
|
||||
file->f_pos = debug->buffer_len - offset;
|
||||
file->f_pos = debug->buffer_len + offset;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue