Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/1119/1

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


Avoid smashing error string.  Remove redundant n<0.
 [rsc] --rw-rw-r-- M 107020 glenda sys 15915 Nov 19 10:56 sys/src/cmd/ramfs.c
	/n/sourcesdump/2005/1119/plan9/sys/src/cmd/ramfs.c:791,803 - 
	/n/sourcesdump/2005/1120/plan9/sys/src/cmd/ramfs.c:791,801
	  		 */
	  		n = read9pmsg(mfd[0], mdata, messagesize);
	  		if(n < 0){
	- 			errstr(buf, sizeof buf);
	+ 			rerrstr(buf, sizeof buf);
	  			if(buf[0]=='\0' || strstr(buf, "hungup"))
	  				exits("");
	  			error("mount read");
	  		}
	- 		if(n < 0)
	- 			error("mount read");
	  		if(n == 0)
	  			continue;
	  		if(convM2S(mdata, n, &thdr) == 0)


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.