end of directory condition is encountered as per SUSv2.
* fhandler_proc.cc (fhandler_proc::readdir): Ditto.
* fhandler_process (fhandler_process::readdir): Ditto.
* fhandler_registry (fhandler_registry::readdir): Ditto.
+2003-08-05 Pavel Tsekov <ptsekov@gmx.net>
+
+ * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Do not change
+ 'errno' if end of directory condition is encountered as per SUSv2.
+ * fhandler_proc.cc (fhandler_proc::readdir): Ditto.
+ * fhandler_process (fhandler_process::readdir): Ditto.
+ * fhandler_registry (fhandler_registry::readdir): Ditto.
+
2003-07-30 Christopher Faylor <cgf@redhat.com>
* dcrt0.cc (_dll_crt0): Move strace.microseconds initialization to
if (!iscygdrive_root ())
return fhandler_disk_file::readdir (dir);
if (!pdrive || !*pdrive)
- {
- set_errno (ENMFILE);
- return NULL;
- }
+ return NULL;
else if (dir->__d_position > 1
&& GetFileAttributes (pdrive) == INVALID_FILE_ATTRIBUTES)
{
dir->__d_position++;
return dir->__d_dirent;
}
- set_errno (ENMFILE);
return NULL;
}
fhandler_process::readdir (DIR * dir)
{
if (dir->__d_position >= PROCESS_LINK_COUNT)
- {
- set_errno (ENMFILE);
- return NULL;
- }
+ return NULL;
strcpy (dir->__d_dirent->d_name, process_listing[dir->__d_position++]);
syscall_printf ("%p = readdir (%p) (%s)", &dir->__d_dirent, dir,
dir->__d_dirent->d_name);
{
RegCloseKey ((HKEY) dir->__d_u.__d_data.__handle);
dir->__d_u.__d_data.__handle = INVALID_HANDLE_VALUE;
- seterrno_from_win_error (__FILE__, __LINE__, error);
+ if (error != ERROR_NO_MORE_ITEMS)
+ seterrno_from_win_error (__FILE__, __LINE__, error);
goto out;
}