diff --git a/include/uv.h b/include/uv.h index 0f89c735..764cf35c 100644 --- a/include/uv.h +++ b/include/uv.h @@ -121,7 +121,8 @@ typedef intptr_t ssize_t; XX( 50, EPERM, "operation not permitted") \ XX( 51, ELOOP, "too many symbolic links encountered") \ XX( 52, EXDEV, "cross-device link not permitted") \ - XX( 53, ENOTEMPTY, "directory not empty") + XX( 53, ENOTEMPTY, "directory not empty") \ + XX( 54, ENOSPC, "no space left on device") #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/src/unix/error.c b/src/unix/error.c index b6c47105..c562753c 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -90,6 +90,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EXDEV: return UV_EXDEV; case EBUSY: return UV_EBUSY; case ENOTEMPTY: return UV_ENOTEMPTY; + case ENOSPC: return UV_ENOSPC; default: return UV_UNKNOWN; } UNREACHABLE(); diff --git a/src/win/error.c b/src/win/error.c index 1951fc3a..7bdc3cda 100644 --- a/src/win/error.c +++ b/src/win/error.c @@ -104,6 +104,11 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case WSAENETUNREACH: return UV_ENETUNREACH; case WSAENOBUFS: return UV_ENOBUFS; case ERROR_OUTOFMEMORY: return UV_ENOMEM; + case ERROR_CANNOT_MAKE: return UV_ENOSPC; + case ERROR_DISK_FULL: return UV_ENOSPC; + 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_NOT_CONNECTED: return UV_ENOTCONN; case WSAENOTCONN: return UV_ENOTCONN; case ERROR_DIR_NOT_EMPTY: return UV_ENOTEMPTY;