Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Add UV_ENOSPC and mappings to it

Closes GH-337
  • Loading branch information...
piscisaureus committed Mar 16, 2012
1 parent dfda500 commit aff94a069ca511caebcbcc9b8c50e2293b3d1d66
Showing with 8 additions and 1 deletion.
  1. +2 −1 include/uv.h
  2. +1 −0 src/unix/error.c
  3. +5 −0 src/win/error.c
@@ -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,
@@ -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();
@@ -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;

0 comments on commit aff94a0

Please sign in to comment.
You can’t perform that action at this time.