Browse Source

Plan 9 from Bell Labs 2012-09-19

David du Colombier 11 years ago
parent
commit
6ea978388b
6 changed files with 23 additions and 17 deletions
  1. 8 6
      sys/man/1/0intro
  2. 1 1
      sys/man/2/authsrv
  3. 1 1
      sys/man/3/arch
  4. 2 2
      sys/src/cmd/gs/mkfile
  5. 4 2
      sys/src/cmd/ndb/dnresolve.c
  6. 7 5
      sys/src/cmd/ndb/dnudpserver.c

+ 8 - 6
sys/man/1/0intro

@@ -103,11 +103,10 @@ See
 and
 .IR init (8)
 for details, but some important aspects of the initial name space are:
-.IP \(bu
+.IP \(bu 3
 The environment variable
 .B $cputype
 is set to the name of the kernel's CPU's architecture: one of
-.BR alpha ,
 .BR mips ,
 .BR sparc ,
 .B power
@@ -124,14 +123,17 @@ The environment variable
 .B $terminal
 is set to a description of the machine running the kernel,
 such as
-.BR "generic pc" .
+.B generic
+.BR pc .
 Sometimes the middle word of
 .B $terminal
 encodes the file from which the kernel is booted;
-e.g.
-.B "alpha apc axp
+e.g.,
+.B alpha
+.B apc
+.B axp
 is bootstrapped from
-.BR /alpha/bapc .
+.BR /alpha/9apc .
 .IP \(bu
 The environment variable
 .B $service

+ 1 - 1
sys/man/2/authsrv

@@ -133,7 +133,7 @@ struct Nvrsafe
 On Sparc, MIPS, and SGI machines this information is
 in non-volatile ram, accessible in the file
 .BR #r/nvram .
-On x86s and Alphas
+On x86s
 .I readnvram
 successively opens the following areas stopping with the
 first to succeed:

+ 1 - 1
sys/man/3/arch

@@ -14,7 +14,7 @@ arch \- architecture-specific information and control
 .B /dev/irqalloc
 .SH DESCRIPTION
 This device presents textual information about PC hardware and allows
-user-level control of the I/O ports on x86-class and DEC Alpha machines.
+user-level control of the I/O ports on x86-class machines.
 .PP
 Reads from
 .I cputype

+ 2 - 2
sys/src/cmd/gs/mkfile

@@ -260,8 +260,8 @@ install-%:V:
 	unmount /bin/gs || status=''
 	unmount /sys/lib/ghostscript || status=''
 	mk installsrc-$stem
-	cpu -h thresher -c 'mk mips.h' || status=''
-	cpu -h alpha -c 'mk alpha.h' || status=''
+#	cpu -h thresher -c 'mk mips.h' || status=''
+#	cpu -h alpha -c 'mk alpha.h' || status=''
 	mk all
 	mk installall
 	for(i in lib/*.ps)

+ 4 - 2
sys/src/cmd/ndb/dnresolve.c

@@ -909,6 +909,8 @@ serveraddrs(Query *qp, int nd, int depth)
 	lock(&dnlock);
 	rrfreelist(arp);
 	unlock(&dnlock);
+	if(nd >= Maxdest)		/* dest array is full? */
+		return Maxdest - 1;
 	return nd;
 }
 
@@ -978,7 +980,7 @@ mydnsquery(Query *qp, int medium, uchar *udppkt, int len)
 {
 	int rv = -1, nfd;
 	char *domain;
-	char conndir[40], net[40];
+	char conndir[NETPATHLEN], net[NETPATHLEN];
 	uchar belen[2];
 	NetConnInfo *nci;
 
@@ -1441,7 +1443,7 @@ queryns(Query *qp, int depth, uchar *ibuf, uchar *obuf, ulong waitms, int inns)
 			/* remove all addrs of responding server from list */
 			for(np = qp->dest; np < qp->curdest; np++)
 				if(np->s == p->s)
-					p->nx = Maxtrans;
+					np->nx = Maxtrans;
 
 			/* free or incorporate RRs in m */
 			rv = procansw(qp, &m, srcip, depth, p);

+ 7 - 5
sys/src/cmd/ndb/dnudpserver.c

@@ -51,15 +51,17 @@ clientrxmit(DNSmsg *req, uchar *buf)
 				empty = p;
 			continue;
 		}
-		if(req->id == p->id)
-		if(req->qd->owner == p->owner)
-		if(req->qd->type == p->type)
-		if(memcmp(uh, &p->uh, Udphdrsize) == 0)
+		if(req->id == p->id && req->qd != nil &&
+		    req->qd->owner == p->owner && req->qd->type == p->type &&
+		    memcmp(uh, &p->uh, Udphdrsize) == 0)
 			return nil;
 	}
 	if(empty == nil)
 		return nil; /* shouldn't happen: see slave() & Maxactive def'n */
-
+	if(req->qd == nil) {
+		dnslog("clientrxmit: nil req->qd");
+		return nil;
+	}
 	empty->id = req->id;
 	empty->owner = req->qd->owner;
 	empty->type = req->qd->type;