X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=blobdiff_plain;f=client%2Fadnstest.c;h=36d7ffe781f1100daf01be348dd8be6f9b935578;hp=e99f5a1ac4967f42982787dca5b041f5f8b02501;hb=43d09cece8961614dd55b07d298687aeabf47152;hpb=bef232aebeabbef525faa7d7f5b08cf7a1427f95 diff --git a/client/adnstest.c b/client/adnstest.c index e99f5a1..36d7ffe 100644 --- a/client/adnstest.c +++ b/client/adnstest.c @@ -77,7 +77,18 @@ static void failure_status(const char *what, adns_status st) { static void failure_errno(const char *what, int errnoval) NONRETURNING; static void failure_errno(const char *what, int errnoval) { - fprintf(stderr,"adns failure: %s: errno=%d\n",what,errnoval); + switch (errnoval) { +#define CE(e) \ + case e: fprintf(stderr,"adns failure: %s: errno=" #e "\n",what); break + CE(EINVAL); + CE(EINTR); + CE(ESRCH); + CE(EAGAIN); + CE(ENOSYS); + CE(ERANGE); +#undef CE + default: fprintf(stderr,"adns failure: %s: errno=%d\n",what,errnoval); break; + } quitnow(2); }