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 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