2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00
bind/lib/isc/result.c

38 lines
976 B
C
Raw Normal View History

1998-10-14 22:35:04 +00:00
1998-12-12 19:25:20 +00:00
#include <config.h>
1998-10-14 22:35:04 +00:00
#include <isc/result.h>
1998-11-11 19:02:52 +00:00
static char *text_table[ISC_R_LASTENTRY + 1] = {
1998-11-06 01:44:19 +00:00
"success", /* 0 */
"out of memory", /* 1 */
"timed out", /* 2 */
"no available threads", /* 3 */
"address not available", /* 4 */
"address in use", /* 5 */
"permission denied", /* 6 */
"no pending connections", /* 7 */
"network unreachable", /* 8 */
"host unreachable", /* 9 */
"network down", /* 10 */
"host down", /* 11 */
"connection refused", /* 12 */
"not enough free resources", /* 13 */
"end of file", /* 14 */
"socket already bound", /* 15 */
"task was shut down", /* 16 */
1998-11-11 19:02:52 +00:00
"lock busy", /* 17 */
1998-11-16 23:49:08 +00:00
"already exists", /* 18 */
1998-12-01 23:59:39 +00:00
"buffer too small", /* 19 */
"operation canceled", /* 20 */
1998-10-14 22:35:04 +00:00
};
char *
1998-10-26 23:07:15 +00:00
isc_result_totext(isc_result_t result) {
1998-10-14 22:35:04 +00:00
if (result == ISC_R_UNEXPECTED)
return ("unexpected error");
1998-11-11 19:02:52 +00:00
if (result > ISC_R_LASTENTRY)
1998-10-14 22:35:04 +00:00
return ("unknown result code");
return (text_table[result]);
}