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

Commit

Permalink
common: add UV_ENOSYS error code
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Oct 11, 2011
1 parent a3d495c commit 61343ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/uv.h
Expand Up @@ -82,6 +82,7 @@ typedef enum {
UV_ENOTSOCK,
UV_ENOTSUP,
UV_ENOENT,
UV_ENOSYS,
UV_EPIPE,
UV_EPROTO,
UV_EPROTONOSUPPORT,
Expand Down
2 changes: 2 additions & 0 deletions src/unix/error.c
Expand Up @@ -58,6 +58,7 @@ void uv_fatal_error(const int errorno, const char* syscall) {

static int uv__translate_lib_error(int code) {
switch (code) {
case UV_ENOSYS: return ENOSYS;
case UV_ENOENT: return ENOENT;
case UV_EACCESS: return EACCES;
case UV_EBADF: return EBADF;
Expand All @@ -84,6 +85,7 @@ static int uv__translate_lib_error(int code) {
uv_err_code uv_translate_sys_error(int sys_errno) {
switch (sys_errno) {
case 0: return UV_OK;
case ENOSYS: return UV_ENOSYS;
case ENOENT: return UV_ENOENT;
case EACCES: return UV_EACCESS;
case EBADF: return UV_EBADF;
Expand Down
1 change: 1 addition & 0 deletions src/uv-common.c
Expand Up @@ -82,6 +82,7 @@ const char* uv_err_name(uv_err_t err) {
case UV_ENOTSOCK: return "ENOTSOCK";
case UV_ENOTSUP: return "ENOTSUP";
case UV_ENOENT: return "ENOENT";
case UV_ENOSYS: return "ENOSYS";
case UV_EPIPE: return "EPIPE";
case UV_EPROTO: return "EPROTO";
case UV_EPROTONOSUPPORT: return "EPROTONOSUPPORT";
Expand Down

0 comments on commit 61343ec

Please sign in to comment.