Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2006/0125/3

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


Set better error message in vtdial.
 [rsc] --rw-rw-r-- M 1250499 rsc sys 5493 Jan 25 07:17 sys/src/libventi/client.c
	/n/sourcesdump/2006/0125/plan9/sys/src/libventi/client.c:29,40 - 
	/n/sourcesdump/2006/0126/plan9/sys/src/libventi/client.c:29,47
	  	if(host == nil)
	  		host = "$venti";
	  
	- 	na = netmkaddr(host, 0, "venti");
	- 	fd = dial(na, 0, 0, 0);
	+ 	if (host == nil) {
	+ 		if (!canfail)
	+ 			werrstr("no venti host set");
	+ 		na = "";
	+ 		fd = -1;
	+ 	} else {
	+ 		na = netmkaddr(host, 0, "venti");
	+ 		fd = dial(na, 0, 0, 0);
	+ 	}
	  	if(fd < 0){
	  		rerrstr(e, sizeof e);
	  		if(!canfail){
	- 			vtSetError("%s", e);
	+ 			vtSetError("venti dialstring %s: %s", na, e);
	  			return nil;
	  		}
	  	}


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.