commit 03480d733369315ada5b35733796e786c807d3c1 from: rsc date: Fri Jan 09 20:07:49 2004 UTC Why would the Linux man page actually tell the truth? commit - 060c0d5fcb7be4942fbb582a24ae5a3aca330808 commit + 03480d733369315ada5b35733796e786c807d3c1 blob - db80c357b0029d4adbda65a17efd22dde3e229a7 blob + aef0102f85fae9bb11e921ee5dda0aab3aa5c018 --- src/lib9/dirread.c +++ 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__)