Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/0910/2

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


Exit with error status on errors.
 [rsc] --rw-rw-r-- M 411683 glenda sys 11753 Sep 10 10:02 sys/src/cmd/dd.c
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/dd.c:51,57 - 
	/n/sourcesdump/2005/0911/plan9/sys/src/cmd/dd.c:51,57
	  void	ebcdic(int cc);
	  void	ibm(int cc);
	  void	block(int cc);
	- void	term(void);
	+ void	term(char*);
	  void	stats(void);
	  
	  #define	iskey(s)	((key[0] == '-') && (strcmp(key+1, s) == 0))
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/dd.c:248,254 - 
	/n/sourcesdump/2005/0911/plan9/sys/src/cmd/dd.c:248,254
	  			perror("read");
	  			if((cflag&NERR) == 0) {
	  				flsh();
	- 				term();
	+ 				term("errors");
	  			}
	  			ibc = 0;
	  			for(c=0; c<ibs; c++)
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/dd.c:258,264 - 
	/n/sourcesdump/2005/0911/plan9/sys/src/cmd/dd.c:258,264
	  			stats();
	  		}else if(ibc == 0 && --files<=0) {
	  			flsh();
	- 			term();
	+ 			term(nil);
	  		}
	  		if(ibc != ibs) {
	  			nipr++;
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/dd.c:300,306 - 
	/n/sourcesdump/2005/0911/plan9/sys/src/cmd/dd.c:300,306
	  			if(c > 0)
	  				++nopr;
	  			perror("write");
	- 			term();
	+ 			term("errors");
	  		}
	  		if(obc == obs)
	  			nofr++;
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/dd.c:541,551 - 
	/n/sourcesdump/2005/0911/plan9/sys/src/cmd/dd.c:541,550
	  }
	  
	  void
	- term(void)
	+ term(char *status)
	  {
	- 
	  	stats();
	- 	exits(0);
	+ 	exits(status);
	  }
	  
	  void
 [sys] --rwxrwxr-x M 411683 glenda sys 45398 Sep 10 23:09 386/bin/dd
	/sys/src/cmd/dd.c:flsh
	/sys/src/cmd/dd.c:main
	/sys/src/cmd/dd.c:number
	/sys/src/cmd/dd.c:stats
	/sys/src/cmd/dd.c:term


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].