diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-05-03 20:11:11 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-05-03 20:11:11 +0400 |
commit | 07a135a6bf9bd7352aa7445c7d169a789f8ae1a9 (patch) | |
tree | 9ec37634892088e1daec22d1be56be25c713308f | |
parent | b96fca8c5a678bb01340ecca488dec364fffecc6 (diff) |
* errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE.
(_sys_errlist): Add entry for ENOSHARE.
(strerror): Add case for ENOSHARE.
* syscalls.cc (stat_worker): Check for errno ENOSHARE.
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/errno.cc | 8 | ||||
-rw-r--r-- | winsup/cygwin/syscalls.cc | 3 |
3 files changed, 15 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 617931a9a..d75ee33b7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Wed May 3 18:07:00 2000 Corinna Vinschen <corinna@vinschen.de> + + * errno.cc (errmap): Map ERROR_BAD_NETPATH to new errno ENOSHARE. + (_sys_errlist): Add entry for ENOSHARE. + (strerror): Add case for ENOSHARE. + * syscalls.cc (stat_worker): Check for errno ENOSHARE. + Wed May 3 17:28:00 2000 Corinna Vinschen <corinna@vinschen.de> * Makefile.in: Add dependencies for fhandler_random.o diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc index 5921f448e..2f51ac588 100644 --- a/winsup/cygwin/errno.cc +++ b/winsup/cygwin/errno.cc @@ -50,7 +50,7 @@ errmap[] = X (NOT_SUPPORTED, ENOSYS), X (REM_NOT_LIST, ENONET), X (DUP_NAME, ENOTUNIQ), - X (BAD_NETPATH, ENXIO), + X (BAD_NETPATH, ENOSHARE), X (FILE_EXISTS, EEXIST), X (CANNOT_MAKE, EPERM), X (INVALID_PARAMETER, EINVAL), @@ -279,7 +279,8 @@ extern const char __declspec(dllexport) * const _sys_errlist[]= /* EDQUOT 132 */ "Quota exceeded", /* ESTALE 133 */ "Stale NFS file handle", /* ENOTSUP 134 */ "134", -/* ENOMEDIUM 135 */ "no medium" +/* ENOMEDIUM 135 */ "no medium", +/* ENOSHARE 136 */ "No such host or network path" }; int __declspec(dllexport) _sys_nerr = @@ -652,6 +653,9 @@ strerror (int errnum) case ENOMEDIUM: error = "no medium"; break; + case ENOSHARE: + error = "No such host or network path"; + break; default: #ifdef _MT_SAFE char *buf= _reent_winsup()->_strerror_buf; diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index d45909883..529c7f627 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1030,7 +1030,8 @@ stat_worker (const char *caller, const char *name, struct stat *buf, buf->st_nlink = (dtype == DRIVE_REMOTE ? 1 : num_entries (real_path.get_win32 ())); } - else if (atts != -1 || (!oret && get_errno () != ENOENT)) + else if (atts != -1 || (!oret && get_errno () != ENOENT + && get_errno () != ENOSHARE)) { /* Unfortunately, the above open may fail if the file exists, though. So we have to care for this case here, too. */ |