From 58733d18a6bd9930a9f365ca433256cc57ba184c 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` --- 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 f8e1d273..b9e5140d 100644 --- a/include/uv.h +++ b/include/uv.h @@ -123,7 +123,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 7ba2c89e..0c888dcc 100644 --- a/src/unix/error.c +++ b/src/unix/error.c @@ -92,6 +92,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; default: return UV_UNKNOWN; } UNREACHABLE();