From: Wouter Wijngaards Date: Fri, 7 Dec 2007 11:01:04 +0000 (+0000) Subject: small improvements. X-Git-Tag: release-0.9~120 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a198e0b4c0887540a6bd1c2b053bdfa4eff3454;p=thirdparty%2Funbound.git small improvements. git-svn-id: file:///svn/unbound/trunk@816 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 8ade6427a..e83132723 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -2,6 +2,8 @@ - unbound-host has a -d option to show what happens. This can help with debugging (why do I get this answer). - fixup CNAME handling, on nodata, sets and display canonname. + - dot removed from CNAME display. + - respect -v for NXDOMAINs. 6 December 2007: Wouter - library resolution works in foreground mode, unbound-host app diff --git a/smallapp/unbound-host.c b/smallapp/unbound-host.c index 7326c7d67..abd8a0f12 100644 --- a/smallapp/unbound-host.c +++ b/smallapp/unbound-host.c @@ -52,7 +52,7 @@ static void usage() { printf("Usage: unbound-host [-vdh] [-c class] [-t type] hostname\n"); - printf(" [-y key] [-f keyfile] [-F named.conf]\n"); + printf(" [-y key] [-f keyfile] [-F namedkeyfile]\n"); printf(" Queries the DNS for information.\n"); printf(" The hostname is looked up for IP4, IP6 and mail.\n"); printf(" If an ip-address is given a reverse lookup is done.\n"); @@ -283,8 +283,11 @@ pretty_output(char* q, int t, int c, int sec, int haved, pretty_rcode(rcodestr, 16, result->rcode); if(!haved && result->rcode) { - printf("Host %s not found: %d(%s). %s\n", - q, result->rcode, rcodestr, secstatus); + printf("Host %s not found: %d(%s).", + q, result->rcode, rcodestr); + if(verb > 0) + printf(" %s", secstatus); + printf("\n"); return; } if(docname && result->canonname && @@ -295,6 +298,9 @@ pretty_output(char* q, int t, int c, int sec, int haved, printf(" %s", secstatus); printf("\n"); } + /* remove trailing . from long canonnames for nicer output */ + if(result->canonname && strlen(result->canonname) > 1) + result->canonname[strlen(result->canonname)-1] = 0; if(!haved) { if(verb > 0) { printf("%s", result->canonname?result->canonname:q);