From dd2eda5a90ab86bbde1a9da481a423d367586a73 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 31 Jul 2017 16:56:02 -0700 Subject: Add new errnos we might need. --- src/nng.c | 4 ++++ src/nng.h | 4 ++++ src/platform/posix/posix_debug.c | 6 ++++++ 3 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/nng.c b/src/nng.c index 6c28f039..2cd1b3a5 100644 --- a/src/nng.c +++ b/src/nng.c @@ -638,6 +638,10 @@ static const struct { { NNG_ECONNRESET, "Connection reset" }, { NNG_ECONNABORTED, "Connection aborted" }, { NNG_ECANCELED, "Operation canceled" }, + { NNG_ENOFILES, "Out of files" }, + { NNG_ENOSPC, "Out of space" }, + { NNG_EEXIST, "Resource already exists" }, + { NNG_EINTERNAL, "Internal error detected" }, { 0, NULL } // clang-format on }; diff --git a/src/nng.h b/src/nng.h index 0c76ffe7..568347b3 100644 --- a/src/nng.h +++ b/src/nng.h @@ -549,6 +549,10 @@ enum nng_errno_enum { NNG_ECONNABORTED = 18, NNG_ECONNRESET = 19, NNG_ECANCELED = 20, + NNG_ENOFILES = 21, + NNG_ENOSPC = 22, + NNG_EEXIST = 23, + NNG_EINTERNAL = 24, }; // NNG_SYSERR is a special code, which allows us to wrap errors from the diff --git a/src/platform/posix/posix_debug.c b/src/platform/posix/posix_debug.c index 647d93ff..4af224c4 100644 --- a/src/platform/posix/posix_debug.c +++ b/src/platform/posix/posix_debug.c @@ -81,6 +81,12 @@ static struct { #endif { ETIMEDOUT, NNG_ETIMEDOUT }, { EWOULDBLOCK, NNG_EAGAIN }, + { ENOSPC, NNG_ENOSPC }, + { EFBIG, NNG_ENOSPC }, + { EDQUOT, NNG_ENOSPC }, + { ENFILE, NNG_ENOFILES }, + { EMFILE, NNG_ENOFILES }, + { EEXIST, NNG_EEXIST }, // must be last { 0, 0 }, // clang-format on -- cgit v1.2.3-70-g09d2