tfixes - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit aa01e1feaf14c476811c973cdde801c305dd8fed
parent 27b457ae8ac1d0e7816f7a683dc8814a0f11e9cb
Author: rsc 
Date:   Wed, 15 Feb 2006 18:37:21 +0000

fixes

Diffstat:
  M src/cmd/ndb/dnsdebug.c              |       3 +--
  M src/cmd/ndb/dnsquery.c              |       4 ++--
  M src/cmd/ndb/dnstcp.c                |      12 ++++++++++--

3 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/src/cmd/ndb/dnsdebug.c b/src/cmd/ndb/dnsdebug.c
t@@ -47,6 +47,7 @@ usage(void)
         fprint(2, "usage: dnsdebug -rxf [-p port] [query ...]\n");
         threadexitsall("usage");
 }
+char *portname = "domain";
 
 void
 threadmain(int argc, char *argv[])
t@@ -323,7 +324,6 @@ squirrelserveraddrs(void)
                         l = &(*l)->next;
                         continue;
                 }
-                req.isslave = 1;
                 req.aborttime = now + 60;        /* don't spend more than 60 seconds */
                 *l = dnresolve(rp->host->name, Cin, Ta, &req, 0, 0, Recurse, 0, 0);
                 while(*l != nil)
t@@ -427,7 +427,6 @@ doquery(char *name, char *tstr)
         }
 
         getactivity(&req);
-        req.isslave = 1;
         req.aborttime = now + 60;        /* don't spend more than 60 seconds */
         rr = dnresolve(buf, Cin, type, &req, 0, 0, Recurse, rooted, 0);
         if(rr){
diff --git a/src/cmd/ndb/dnsquery.c b/src/cmd/ndb/dnsquery.c
t@@ -3,6 +3,7 @@
 #include 
 #include 
 #include 
+#include <9pclient.h>
 #include "dns.h"
 #include "ip.h"
 
t@@ -14,9 +15,8 @@ usage(void)
 }
 
 void
-main(int argc, char *argv[])
+threadmain(int argc, char *argv[])
 {
-        char *dns;
         CFid *fd;
         int n, len;
         Biobuf in;
diff --git a/src/cmd/ndb/dnstcp.c b/src/cmd/ndb/dnstcp.c
t@@ -28,10 +28,15 @@ char        *zonerefreshprogram;
 char        *portname = "domain";
 
 void
-threadmain(int argc, char *argv[])
+usage(void)
 {
-        char *ext = "";
+        fprint(2, "usage: dnstcp [-dr] [-f dbfile]\n");
+        threadexitsall("usage");
+}
 
+void
+threadmain(int argc, char *argv[])
+{
         ARGBEGIN{
         default:
                 usage();
t@@ -46,6 +51,9 @@ threadmain(int argc, char *argv[])
                 break;
         }ARGEND
 
+        if(argc)
+                usage();
+
         if(debug < 2)
                 debug = 0;