Permalink
Browse files

UV_EACCESS -> UV_EACCES

In order to match existing Node API. See
nodejs/node-v0.x-archive#2001
  • Loading branch information...
ry committed Nov 3, 2011
1 parent 147487a commit 681bd290e646deec767b23f80b3c86d10ef44b5b
Showing with 9 additions and 9 deletions.
  1. +1 −1 include/uv.h
  2. +2 −2 src/unix/error.c
  3. +1 −1 src/uv-common.c
  4. +2 −2 src/win/error.c
  5. +1 −1 src/win/pipe.c
  6. +1 −1 test/test-ipc.c
  7. +1 −1 test/test-pipe-bind-error.c
View
@@ -72,7 +72,7 @@ typedef enum {
UV_OK = 0,
UV_EOF,
UV_EADDRINFO,
- UV_EACCESS,
+ UV_EACCES,
UV_EAGAIN,
UV_EADDRINUSE,
UV_EADDRNOTAVAIL,
View
@@ -61,7 +61,7 @@ static int uv__translate_lib_error(int code) {
case UV_ENOSYS: return ENOSYS;
case UV_ENOTSOCK: return ENOTSOCK;
case UV_ENOENT: return ENOENT;
- case UV_EACCESS: return EACCES;
+ case UV_EACCES: return EACCES;
case UV_EAFNOSUPPORT: return EAFNOSUPPORT;
case UV_EBADF: return EBADF;
case UV_EPIPE: return EPIPE;
@@ -92,7 +92,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case ENOSYS: return UV_ENOSYS;
case ENOTSOCK: return UV_ENOTSOCK;
case ENOENT: return UV_ENOENT;
- case EACCES: return UV_EACCESS;
+ case EACCES: return UV_EACCES;
case EAFNOSUPPORT: return UV_EAFNOSUPPORT;
case EBADF: return UV_EBADF;
case EPIPE: return UV_EPIPE;
View
@@ -57,7 +57,7 @@ const char* uv_err_name(uv_err_t err) {
case UV_OK: return "OK";
case UV_EOF: return "EOF";
case UV_EADDRINFO: return "EADDRINFO";
- case UV_EACCESS: return "EACCESS";
+ case UV_EACCES: return "EACCESS";
case UV_EAGAIN: return "EAGAIN";
case UV_EADDRINUSE: return "EADDRINUSE";
case UV_EADDRNOTAVAIL: return "EADDRNOTAVAIL";
View
@@ -90,8 +90,8 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case ERROR_SUCCESS: return UV_OK;
case ERROR_FILE_NOT_FOUND: return UV_ENOENT;
case ERROR_PATH_NOT_FOUND: return UV_ENOENT;
- case ERROR_NOACCESS: return UV_EACCESS;
- case WSAEACCES: return UV_EACCESS;
+ case ERROR_NOACCESS: return UV_EACCES;
+ case WSAEACCES: return UV_EACCES;
case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE;
case WSAEADDRINUSE: return UV_EADDRINUSE;
case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL;
View
@@ -362,7 +362,7 @@ int uv_pipe_bind(uv_pipe_t* handle, const char* name) {
if (errno == ERROR_ACCESS_DENIED) {
uv__set_error(loop, UV_EADDRINUSE, errno);
} else if (errno == ERROR_PATH_NOT_FOUND || errno == ERROR_INVALID_NAME) {
- uv__set_error(loop, UV_EACCESS, errno);
+ uv__set_error(loop, UV_EACCES, errno);
} else {
uv__set_sys_error(loop, errno);
}
View
@@ -275,4 +275,4 @@ TEST_IMPL(listen_no_simultaneous_accepts) {
return 0;
}
-#endif
+#endif
@@ -84,7 +84,7 @@ TEST_IMPL(pipe_bind_error_addrnotavail) {
r = uv_pipe_bind(&server, BAD_PIPENAME);
ASSERT(r == -1);
- ASSERT(uv_last_error(uv_default_loop()).code == UV_EACCESS);
+ ASSERT(uv_last_error(uv_default_loop()).code == UV_EACCES);
uv_close((uv_handle_t*)&server, close_cb);

0 comments on commit 681bd29

Please sign in to comment.