Why would the Linux man page actually tell the truth?

This commit is contained in:
rsc 2004-01-09 20:07:49 +00:00
parent 060c0d5fcb
commit 03480d7333

View file

@ -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__)