From: Herbert Valerio Riedel Date: Fri, 23 Jun 2006 22:03:36 +0000 (+0200) Subject: [MTD] CORE mtdchar.c: fix off-by-one error in lseek() X-Git-Tag: v2.6.18-rc1~458^2~1 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1887f517e3cdf5f1e9c0e4daaa864450415a8f61;p=pandora-kernel.git [MTD] CORE mtdchar.c: fix off-by-one error in lseek() Allow lseek(mtdchar_fd, 0, SEEK_END) to succeed, which currently fails with EINVAL. lseek(fd, 0, SEEK_END) should result into the same fileposition as lseek(fd, 0, SEEK_SET) + read(fd, buf, length(fd)) Furthermore, lseek(fd, 0, SEEK_CUR) should return the current file position, which in case of an encountered EOF should not result in EINVAL Signed-off-by: Herbert Valerio Riedel Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse --- Reading git-diff-tree failed