Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
Add UV_ENOSPC and mappings to it
Browse files Browse the repository at this point in the history
Closes GH-337
  • Loading branch information
piscisaureus committed Mar 16, 2012
1 parent dfda500 commit aff94a0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/uv.h
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/unix/error.c
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions src/win/error.c
Expand Up @@ -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;
Expand Down

0 comments on commit aff94a0

Please sign in to comment.