Messages in this thread Patch in this message |  | | Subject | lseek on mem/kmem not working as advertised | Date | Wed, 24 Jul 1996 05:03:32 +0200 | From | Michiel Boland <> |
| |
There is a comment in drivers/char/mem.c, stating that an lseek() on /dev/mem or /dev/kmem returns 0 if the offset is negative. However, this is not the case. So either the comment or the code is incorrect.
--- linux/drivers/char/mem.c.orig Tue Jul 2 18:08:41 1996 +++ linux/drivers/char/mem.c Wed Jul 24 04:49:49 1996 @@ -221,10 +221,10 @@ switch (orig) { case 0: file->f_pos = offset; - return file->f_pos; + break; case 1: file->f_pos += offset; - return file->f_pos; + break; default: return -EINVAL; } -- Michiel Boland <boland@sci.kun.nl> University of Nijmegen The Netherlands
|  |