From edb40b16ce0386566c7c433bbf7224aa4a1c19e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Sat, 14 Apr 2012 17:40:01 +0200 Subject: [PATCH] unix: map `EROFS` to `UV_EROFS` Conflicts: src/unix/error.c --- 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 d3e257f885..340ab11a0b 100644 --- a/include/uv.h +++ b/include/uv.h @@ -122,7 +122,8 @@ typedef intptr_t ssize_t; XX( 52, EXDEV, "cross-device link not permitted") \ XX( 53, ENOTEMPTY, "directory not empty") \ XX( 54, ENOSPC, "no space left on device") \ - XX( 55, EIO, "i/o error") + XX( 55, EIO, "i/o error") \ + XX( 56, EROFS, "read-only file system" ) #define UV_ERRNO_GEN(val, name, s) UV_##name = val, diff --git a/src/unix/error.c b/src/unix/error.c index cbff2dde53..62f1f14304 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -95,6 +95,7 @@ uv_err_code uv_translate_sys_error(int sys_errno) { case EBUSY: return UV_EBUSY; case ENOTEMPTY: return UV_ENOTEMPTY; case ENOSPC: return UV_ENOSPC; + case EROFS: return UV_EROFS; case ENOMEM: return UV_ENOMEM; default: return UV_UNKNOWN; }