diff options
author | Christopher Faylor <me@cgf.cx> | 2003-08-05 03:04:28 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-08-05 03:04:28 +0000 |
commit | 3fea2e408799e2a4539ddaf050331e877639a8aa (patch) | |
tree | 00a642eba1145a48575ac19196946f807851bb4b /winsup | |
parent | 2f631ebc94703f06ddb26fd256daff72686d01f0 (diff) | |
download | cygnal-3fea2e408799e2a4539ddaf050331e877639a8aa.tar.gz cygnal-3fea2e408799e2a4539ddaf050331e877639a8aa.tar.bz2 cygnal-3fea2e408799e2a4539ddaf050331e877639a8aa.zip |
* 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.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 1 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_registry.cc | 3 |
5 files changed, 12 insertions, 10 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 1837130ce..10a56052d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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 diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index be634bda2..5b873a045 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -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) { diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index d7f5a1a3b..584064210 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -206,7 +206,6 @@ fhandler_proc::readdir (DIR * dir) dir->__d_position++; return dir->__d_dirent; } - set_errno (ENMFILE); return NULL; } diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index 193fd959c..44b7189b3 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -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); diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 85ea02fcb..39a89204e 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -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; } |