From owner-cvs-all Thu Oct 21 2:14:53 1999 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 81B2414C8B; Thu, 21 Oct 1999 02:14:50 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA38920; Thu, 21 Oct 1999 02:14:50 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Message-Id: <199910210914.CAA38920@freefall.freebsd.org> From: Marcel Moolenaar Date: Thu, 21 Oct 1999 02:14:50 -0700 (PDT) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/i386/linux linux_file.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk marcel 1999/10/21 02:14:50 PDT Modified files: sys/i386/linux linux_file.c Log: Fix the duplicate filenames that are the result of using getdents. glibc2 defines struct dirent differently than the Linux kernel does. The getdents function therefore needs to read a heuristically defined number of kernel dirents to satisfy the request. In case where too many kernel dirents have been read, the function lseeks on the directory so that a next call will start with the right dirent. The offset used in lseeking is the offset-field in the last dirent passed to the application. This can only mean that the offset-field holds the offset of the next dirent and not the offset of the dirent itself. Revision Changes Path 1.36 +2 -2 src/sys/i386/linux/linux_file.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message