From dbc046cb7f3705d9f9a386e22f48e7996624909a Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 6 Feb 2012 00:21:33 -0800 Subject: [PATCH] Add EXDEV to the errno map. --- include/uv.h | 3 ++- src/unix/error.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/uv.h b/include/uv.h index a3f75d71..d8f861e3 100644 --- a/include/uv.h +++ b/include/uv.h @@ -118,7 +118,8 @@ typedef intptr_t ssize_t; XX( 48, ESRCH, "no such process") \ XX( 49, ENAMETOOLONG, "name too long") \ XX( 50, EPERM, "operation not permitted") \ - XX( 51, ELOOP, "too many symbolic links encountered") + XX( 51, ELOOP, "too many symbolic links encountered") \ + XX( 52, EXDEV, "cross-device link not permitted") #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/src/unix/error.c b/src/unix/error.c index 3524e664..93c5ac1f 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -87,6 +87,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EAI_NONAME: return UV_ENOENT; case ESRCH: return UV_ESRCH; case ETIMEDOUT: return UV_ETIMEDOUT; + case EXDEV: return UV_EXDEV; default: return UV_UNKNOWN; }