summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-05-04 11:00:39 -0700
committerisaacs <i@izs.me>2012-05-04 11:00:39 -0700
commit719cd461d39d01ab0d2a4a396813c59daf2ad7f1 (patch)
tree05310061250560594a4d4f5c03d4737666d4d6af /deps
parentab60efb535463757707fda6b712d5f68692b26dd (diff)
downloadnode-new-719cd461d39d01ab0d2a4a396813c59daf2ad7f1.tar.gz
Upgrade uv to 936795a2c
Diffstat (limited to 'deps')
-rw-r--r--deps/uv/include/uv.h4
-rw-r--r--deps/uv/src/unix/error.c2
-rw-r--r--deps/uv/src/win/error.c17
-rw-r--r--deps/uv/test/test-spawn.c7
4 files changed, 28 insertions, 2 deletions
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index c6f15e84d4..340ab11a0b 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -121,7 +121,9 @@ typedef intptr_t ssize_t;
XX( 51, ELOOP, "too many symbolic links encountered") \
XX( 52, EXDEV, "cross-device link not permitted") \
XX( 53, ENOTEMPTY, "directory not empty") \
- XX( 54, ENOSPC, "no space left on device")
+ XX( 54, ENOSPC, "no space left on device") \
+ XX( 55, EIO, "i/o error") \
+ XX( 56, EROFS, "read-only file system" )
#define UV_ERRNO_GEN(val, name, s) UV_##name = val,
diff --git a/deps/uv/src/unix/error.c b/deps/uv/src/unix/error.c
index e01d06ac6d..62f1f14304 100644
--- a/deps/uv/src/unix/error.c
+++ b/deps/uv/src/unix/error.c
@@ -59,6 +59,7 @@ void uv_fatal_error(const int errorno, const char* syscall) {
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case 0: return UV_OK;
+ case EIO: return UV_EIO;
case EPERM: return UV_EPERM;
case ENOSYS: return UV_ENOSYS;
case ENOTSOCK: return UV_ENOTSOCK;
@@ -94,6 +95,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case EBUSY: return UV_EBUSY;
case ENOTEMPTY: return UV_ENOTEMPTY;
case ENOSPC: return UV_ENOSPC;
+ case EROFS: return UV_EROFS;
case ENOMEM: return UV_ENOMEM;
default: return UV_UNKNOWN;
}
diff --git a/deps/uv/src/win/error.c b/deps/uv/src/win/error.c
index e818fc5c4a..294041264c 100644
--- a/deps/uv/src/win/error.c
+++ b/deps/uv/src/win/error.c
@@ -67,6 +67,21 @@ void uv_fatal_error(const int errorno, const char* syscall) {
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case ERROR_SUCCESS: return UV_OK;
+ case ERROR_BEGINNING_OF_MEDIA: return UV_EIO;
+ case ERROR_BUS_RESET: return UV_EIO;
+ case ERROR_CRC: return UV_EIO;
+ case ERROR_DEVICE_DOOR_OPEN: return UV_EIO;
+ case ERROR_DEVICE_REQUIRES_CLEANING: return UV_EIO;
+ case ERROR_DISK_CORRUPT: return UV_EIO;
+ case ERROR_EOM_OVERFLOW: return UV_EIO;
+ case ERROR_FILEMARK_DETECTED: return UV_EIO;
+ case ERROR_INVALID_BLOCK_LENGTH: return UV_EIO;
+ case ERROR_IO_DEVICE: return UV_EIO;
+ case ERROR_NO_DATA_DETECTED: return UV_EIO;
+ case ERROR_NO_SIGNAL_SENT: return UV_EIO;
+ case ERROR_OPEN_FAILED: return UV_EIO;
+ case ERROR_SETMARK_DETECTED: return UV_EIO;
+ case ERROR_SIGNAL_REFUSED: return UV_EIO;
case ERROR_FILE_NOT_FOUND: return UV_ENOENT;
case ERROR_INVALID_NAME: return UV_ENOENT;
case ERROR_MOD_NOT_FOUND: return UV_ENOENT;
@@ -111,6 +126,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case ERROR_EA_TABLE_FULL: return UV_ENOSPC;
case ERROR_END_OF_MEDIA: return UV_ENOSPC;
case ERROR_HANDLE_DISK_FULL: return UV_ENOSPC;
+ case ERROR_WRITE_PROTECT: return UV_EROFS;
case ERROR_NOT_CONNECTED: return UV_ENOTCONN;
case WSAENOTCONN: return UV_ENOTCONN;
case ERROR_DIR_NOT_EMPTY: return UV_ENOTEMPTY;
@@ -128,6 +144,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case WSAETIMEDOUT: return UV_ETIMEDOUT;
case WSAHOST_NOT_FOUND: return UV_ENOENT;
case WSAENOTSOCK: return UV_ENOTSOCK;
+ case ERROR_NOT_SAME_DEVICE: return UV_EXDEV;
default: return UV_UNKNOWN;
}
}
diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c
index c79602adcc..6c29fa7677 100644
--- a/deps/uv/test/test-spawn.c
+++ b/deps/uv/test/test-spawn.c
@@ -25,6 +25,11 @@
#include <stdlib.h>
#include <string.h>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+
+
static int close_cb_called;
static int exit_cb_called;
static uv_process_t process;
@@ -513,7 +518,7 @@ TEST_IMPL(spawn_setuid_setgid) {
init_process_options2("spawn_helper1", exit_cb);
- // become the "nobody" user.
+ /* become the "nobody" user. */
struct passwd* pw;
pw = getpwnam("nobody");
ASSERT(pw != NULL);