]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
small improvements.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 7 Dec 2007 11:01:04 +0000 (11:01 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 7 Dec 2007 11:01:04 +0000 (11:01 +0000)
git-svn-id: file:///svn/unbound/trunk@816 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
smallapp/unbound-host.c

index 8ade6427a1ea90b9b52eaabd021099ef34240b5d..e831327235229af31f0a475fae7ec516e8de6419 100644 (file)
@@ -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
index 7326c7d678b18358416dced8cff8fbea24c61307..abd8a0f12b65e2abce7bc3fb091c117b20ac4660 100644 (file)
@@ -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);