lkml.org 
[lkml]   [1996]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subjectlseek on mem/kmem not working as advertised
Date
From
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

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.025 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site