* 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.
This commit is contained in:
parent
2f631ebc94
commit
3fea2e4087
@ -1,3 +1,11 @@
|
||||
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
|
||||
|
@ -769,10 +769,7 @@ fhandler_cygdrive::readdir (DIR *dir)
|
||||
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)
|
||||
{
|
||||
|
@ -206,7 +206,6 @@ fhandler_proc::readdir (DIR * dir)
|
||||
dir->__d_position++;
|
||||
return dir->__d_dirent;
|
||||
}
|
||||
set_errno (ENMFILE);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -147,10 +147,7 @@ struct dirent *
|
||||
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);
|
||||
|
@ -331,7 +331,8 @@ retry:
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user