errno: map EFBIG, ENOPROTOOPT and ETXTBSY

This is a backport of:
107be2bed3
4a023fc078
aaaefe32ca
This commit is contained in:
Saúl Ibarra Corretgé 2014-02-24 12:57:28 +01:00
parent 714bec14f6
commit 10f9120d78
2 changed files with 6 additions and 0 deletions

View File

@ -130,6 +130,9 @@ extern "C" {
XX( 57, ENODEV, "no such device") \
XX( 58, ESPIPE, "invalid seek") \
XX( 59, ECANCELED, "operation canceled") \
XX( 60, EFBIG, "file too large") \
XX( 61, ENOPROTOOPT, "protocol not available") \
XX( 62, ETXTBSY, "text file is busy") \
#define UV_ERRNO_GEN(val, name, s) UV_##name = val,

View File

@ -104,6 +104,9 @@ uv_err_code uv_translate_sys_error(int sys_errno) {
case EROFS: return UV_EROFS;
case ENOMEM: return UV_ENOMEM;
case EDQUOT: return UV_ENOSPC;
case EFBIG: return UV_EFBIG;
case ENOPROTOOPT: return UV_ENOPROTOOPT;
case ETXTBSY: return UV_ETXTBSY;
default: return UV_UNKNOWN;
}
UNREACHABLE();