diff options
author | Christopher Faylor <me@cgf.cx> | 2002-05-22 22:09:58 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-05-22 22:09:58 +0000 |
commit | fc240f584b02d8bb1a2bb60927c3d13b583c68a1 (patch) | |
tree | e2905ee758c0cb0d17479f6422fedc4f84352e1d /winsup/cygwin/fhandler_registry.cc | |
parent | 41dc93916139473204dcfeea91cefbdf8f696301 (diff) | |
download | cygnal-fc240f584b02d8bb1a2bb60927c3d13b583c68a1.tar.gz cygnal-fc240f584b02d8bb1a2bb60927c3d13b583c68a1.tar.bz2 cygnal-fc240f584b02d8bb1a2bb60927c3d13b583c68a1.zip |
* fhandler.h (fhandler_virtual::exists): Eliminate path argument.
(fhandler_proc::exists): Ditto.
(fhandler_registry::exists): Ditto.
(fhandler_process::exists): Ditto.
* fhandler_proc.cc (fhandler_proc::exists): Ditto. Use built-in name.
* fhandler_process.cc (fhandler_process::exists): Ditto.
(fstat): Ditto.
* fhandler_registry.cc (fhandler_registry::exists): Ditto.
(fhandler_registry::fstat): Ditto.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* path.cc (path_conv::check): Ditto. Add debugging.
* syscalls.cc (dup): Always call dup2 for error handling.
Diffstat (limited to 'winsup/cygwin/fhandler_registry.cc')
-rw-r--r-- | winsup/cygwin/fhandler_registry.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc index 4fc502477..186dfa4be 100644 --- a/winsup/cygwin/fhandler_registry.cc +++ b/winsup/cygwin/fhandler_registry.cc @@ -93,7 +93,7 @@ static const char *DEFAULT_VALUE_NAME = "@"; * to the final key in the path. */ int -fhandler_registry::exists (const char *path) +fhandler_registry::exists () { int file_type = 0, index = 0, pathlen; DWORD buf_size = MAX_PATH; @@ -102,6 +102,7 @@ fhandler_registry::exists (const char *path) const char *file; HKEY hKey = (HKEY) INVALID_HANDLE_VALUE; + const char *path = get_name (); debug_printf ("exists (%s)", path); path += proc_len + 1 + registry_len; @@ -187,7 +188,7 @@ fhandler_registry::fstat (struct __stat64 *buf, path_conv *pc) { this->fhandler_base::fstat (buf, pc); buf->st_mode &= ~_IFMT & NO_W; - int file_type = exists (get_name ()); + int file_type = exists (); switch (file_type) { case 0: |