tWhy would the Linux man page actually tell the truth? - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 03480d733369315ada5b35733796e786c807d3c1
(DIR) parent 060c0d5fcb7be4942fbb582a24ae5a3aca330808
(HTM) Author: rsc <devnull@localhost>
Date: Fri, 9 Jan 2004 20:07:49 +0000
Why would the Linux man page actually tell the truth?
Diffstat:
M src/lib9/dirread.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
(DIR) diff --git a/src/lib9/dirread.c b/src/lib9/dirread.c
t@@ -13,10 +13,9 @@ mygetdents(int fd, struct dirent *buf, int n)
off_t off;
int nn;
+ /* This doesn't match the man page, but it works in Debian with a 2.2 kernel */
off = p9seek(fd, 0, 1);
nn = getdirentries(fd, (void*)buf, n, &off);
- if(nn > 0)
- p9seek(fd, off, 0);
return nn;
}
#elif defined(__APPLE__) || defined(__FreeBSD__)