Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2007/0418/1

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


/sys/src/cmd/ndb/cs.c /sys/main/2/ndb /sys/man/6/ndb /sys/man/8/ndb /sys/src/libndb/ndbipinfo.c
% cat >/sys/lib/dist/changes/1176931805.0.txt << EOF
Correctly document the behavior of the @ flag
EOF
 [geoff] --rw-rw-r-- M 44 glenda sys 33123 Apr 18 17:30 sys/src/cmd/ndb/cs.c
	/n/sourcesdump/2007/0418/plan9/sys/src/cmd/ndb/cs.c:1770,1778 - 
	/n/sources/plan9/sys/src/cmd/ndb/cs.c:1770,1778
	  	 */
	  	nresolve = 0;
	  	for(i = 0; i < n; i++)
	- 		if(*list[i] == '@'){
	+ 		if(*list[i] == '@'){		/* @attr=val ? */
	  			list[i]++;
	- 			resolve[i] = 1;
	+ 			resolve[i] = 1;		/* we'll resolve it */
	  			nresolve++;
	  		} else
	  			resolve[i] = 0;
 [geoff] --rw-rw-r-- M 44 glenda sys 9743 Apr 18 17:35 sys/man/2/ndb
	/n/sourcesdump/2007/0418/plan9/sys/man/2/ndb:262,267 - 
	/n/sources/plan9/sys/man/2/ndb:262,276
	  .I n
	  element array
	  .IR attrs .
	+ If any
	+ .I attrs
	+ begin with
	+ .LR @ ,
	+ the
	+ .L @
	+ is excluded from the attribute name,
	+ but causes any corresponding value returned
	+ to be a resolved IP address(es), not a name.
	  For example, consider the following database entries describing a network,
	  a subnetwork, and a system.
	  .IP
 [geoff] --rw-rw-r-- M 44 glenda sys 6671 Apr 18 17:35 sys/man/6/ndb
	/n/sourcesdump/2007/0418/plan9/sys/man/6/ndb:241,249 - 
	/n/sources/plan9/sys/man/6/ndb:241,246
	  .B dns
	  a DNS server to use (for DNS and DHCP)
	  .TP
	- .B @dns
	- a DNS server to forward queries to when running as a resolver (for DNS)
	- .TP
	  .B ntp
	  an NTP server to use (for DHCP)
	  .TP
 [geoff] --rw-rw-r-- M 44 glenda sys 13254 Apr 18 17:35 sys/man/8/ndb
	/n/sourcesdump/2007/0418/plan9/sys/man/8/ndb:297,303 - 
	/n/sources/plan9/sys/man/8/ndb:297,303
	  must be a space-separated list of such DNS servers' IP addresses,
	  otherwise optional
	  .IR ndb (6)
	- .B @dns
	+ .B dns
	  attributes name DNS servers to forward queries to.
	  .TP
	  .B -R

 [geoff] --rw-rw-r-- M 44 glenda sys 5181 Apr 18 17:29 sys/src/libndb/ndbipinfo.c
	/n/sourcesdump/2007/0418/plan9/sys/src/libndb/ndbipinfo.c:34,41 - 
	/n/sources/plan9/sys/src/libndb/ndbipinfo.c:34,41
	  			first = t;
	  		last = t;
	  		p = *argv++;
	- 		if(*p == '@'){
	- 			t->ptr |= Faddr;
	+ 		if(*p == '@'){			/* @attr=val ? */
	+ 			t->ptr |= Faddr;	/* return resolved address(es) */
	  			p++;
	  		}
	  		strncpy(t->attr, p, sizeof(t->attr)-1);


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.