aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ndb
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-02-15 18:37:21 +0000
committerrsc <devnull@localhost>2006-02-15 18:37:21 +0000
commitaa01e1feaf14c476811c973cdde801c305dd8fed (patch)
tree7df33839ab7810e7993bf4a29d385ed7bc424dde /src/cmd/ndb
parent27b457ae8ac1d0e7816f7a683dc8814a0f11e9cb (diff)
downloadplan9port-aa01e1feaf14c476811c973cdde801c305dd8fed.tar.gz
plan9port-aa01e1feaf14c476811c973cdde801c305dd8fed.tar.bz2
plan9port-aa01e1feaf14c476811c973cdde801c305dd8fed.zip
fixes
Diffstat (limited to 'src/cmd/ndb')
-rwxr-xr-xsrc/cmd/ndb/dnsdebug.c3
-rwxr-xr-xsrc/cmd/ndb/dnsquery.c4
-rwxr-xr-xsrc/cmd/ndb/dnstcp.c12
3 files changed, 13 insertions, 6 deletions
diff --git a/src/cmd/ndb/dnsdebug.c b/src/cmd/ndb/dnsdebug.c
index 34c75d6a..cc84d4e5 100755
--- a/src/cmd/ndb/dnsdebug.c
+++ b/src/cmd/ndb/dnsdebug.c
@@ -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[])
@@ -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)
@@ -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
index 5aa19775..a08f6ae5 100755
--- a/src/cmd/ndb/dnsquery.c
+++ b/src/cmd/ndb/dnsquery.c
@@ -3,6 +3,7 @@
#include <bio.h>
#include <ndb.h>
#include <thread.h>
+#include <9pclient.h>
#include "dns.h"
#include "ip.h"
@@ -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
index f3fea1b0..e3f7eae5 100755
--- a/src/cmd/ndb/dnstcp.c
+++ b/src/cmd/ndb/dnstcp.c
@@ -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();
@@ -46,6 +51,9 @@ threadmain(int argc, char *argv[])
break;
}ARGEND
+ if(argc)
+ usage();
+
if(debug < 2)
debug = 0;