From fcf28b759c65388e8875f2dbcf8eb5fa786b29ec Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Sat, 18 Nov 2000 02:56:48 +0000 Subject: [PATCH] Don't log ENFILE and EMFILE as unexpected errors --- lib/isc/include/isc/result.h | 6 +++--- lib/isc/result.c | 3 ++- lib/isc/unix/errno2result.c | 5 ++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h index e866211c22..fa979d8ccf 100644 --- a/lib/isc/include/isc/result.h +++ b/lib/isc/include/isc/result.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.h,v 1.51 2000/11/07 20:58:07 bwelling Exp $ */ +/* $Id: result.h,v 1.52 2000/11/18 02:56:47 gson Exp $ */ #ifndef ISC_RESULT_H #define ISC_RESULT_H 1 @@ -73,11 +73,11 @@ #define ISC_R_FAMILYMISMATCH 47 /* address family mismatch */ #define ISC_R_FAMILYNOSUPPORT 48 /* AF not supported */ #define ISC_R_BADHEX 49 /* bad hex encoding */ - +#define ISC_R_TOOMANYOPENFILES 50 /* too many open files */ /* * Not a result code: the number of results. */ -#define ISC_R_NRESULTS 50 +#define ISC_R_NRESULTS 51 ISC_LANG_BEGINDECLS diff --git a/lib/isc/result.c b/lib/isc/result.c index 11af0a6341..4e3d3e40e0 100644 --- a/lib/isc/result.c +++ b/lib/isc/result.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: result.c,v 1.49 2000/11/07 20:58:05 bwelling Exp $ */ +/* $Id: result.c,v 1.50 2000/11/18 02:56:45 gson Exp $ */ #include @@ -88,6 +88,7 @@ static const char *text[ISC_R_NRESULTS] = { "address family mismatch", /* 47 */ "address family not supported", /* 48 */ "bad hex encoding", /* 49 */ + "too many open files" /* 50 */ }; #define ISC_RESULT_RESULTSET 2 diff --git a/lib/isc/unix/errno2result.c b/lib/isc/unix/errno2result.c index 76731f2742..b2c96804c7 100644 --- a/lib/isc/unix/errno2result.c +++ b/lib/isc/unix/errno2result.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: errno2result.c,v 1.5 2000/11/14 23:37:26 tale Exp $ */ +/* $Id: errno2result.c,v 1.6 2000/11/18 02:56:48 gson Exp $ */ #include @@ -49,6 +49,9 @@ isc__errno2result(int posixerrno) { return (ISC_R_IOERROR); case ENOMEM: return (ISC_R_NOMEMORY); + case ENFILE: + case EMFILE: + return (ISC_R_TOOMANYOPENFILES); default: /* * XXXDCL would be nice if perhaps this function could