diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2006-02-05 14:17:03 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2006-02-05 14:17:03 +0300 |
commit | da3374d695d101af6e44e9248e66beb4c3d4e5f5 (patch) | |
tree | 447b716e7d45c93f0b87ab0f7713e785a400fdeb /winsup | |
parent | a80fb2764327e4255fac45a31fddebf62ff11e25 (diff) |
* fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label
"out". Move test for NULL __handle ...
(fhandler_disk_file::rewinddir_9x): ... here.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5900a484d..6bd2873e6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2006-02-05 Corinna Vinschen <corinna@vinschen.de> + * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Remove label + "out". Move test for NULL __handle ... + (fhandler_disk_file::rewinddir_9x): ... here. + +2006-02-05 Corinna Vinschen <corinna@vinschen.de> + * dir.cc (rewinddir): Keep dirent_get_d_ino and dirent_set_d_ino flags. 2006-02-05 Christopher Faylor <cgf@timesys.com> diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index b86813ef0..d75b366fb 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1591,12 +1591,6 @@ fhandler_disk_file::readdir (DIR *dir, dirent *de) char fname[CYG_MAX_PATH]; IO_STATUS_BLOCK io; - if (!dir->__handle) - { - res = ENMFILE; - goto out; - } - if (!wincap.is_winnt ()) return readdir_9x (dir, de); @@ -1691,7 +1685,6 @@ fhandler_disk_file::readdir (DIR *dir, dirent *de) res = 0; } -out: syscall_printf ("%d = readdir (%p) (%s)", dir, &de, de->d_name); return res; } @@ -1703,6 +1696,12 @@ fhandler_disk_file::readdir_9x (DIR *dir, dirent *de) int res = 0; BOOL ret = TRUE; + if (!dir->__handle) + { + res = ENMFILE; + goto out; + } + if (dir->__handle == INVALID_HANDLE_VALUE && dir->__d_position == 0) { int len = strlen (dir->__d_dirname); |