From 03480d733369315ada5b35733796e786c807d3c1 Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 9 Jan 2004 20:07:49 +0000 Subject: Why would the Linux man page actually tell the truth? --- src/lib9/dirread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib9') diff --git a/src/lib9/dirread.c b/src/lib9/dirread.c index db80c357..aef0102f 100644 --- a/src/lib9/dirread.c +++ b/src/lib9/dirread.c @@ -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__) -- cgit v1.2.3