dd returns a clear completion code even when it encounters an error. I had reason to hack a simple alterntive, but there are probably better ways to go about it. And there may be other places deserving attention. Notes: Sat Sep 10 10:02:41 EDT 2005 rsc Fixed. Reference: /n/sources/patch/applied/dd_error Date: Fri Sep 9 20:39:20 CES 2005 Reviewed-by: rsc --- /sys/src/cmd/dd.c Fri Sep 9 20:38:01 2005 +++ /sys/src/cmd/dd.c Fri Sep 9 20:37:31 2005 @@ -52,6 +52,7 @@ void ibm(int cc); void block(int cc); void term(void); +void crunch(void); void stats(void); #define iskey(s) ((key[0] == '-') && (strcmp(key+1, s) == 0)) @@ -248,7 +249,7 @@ perror("read"); if((cflag&NERR) == 0) { flsh(); - term(); + crunch(); } ibc = 0; for(c=0; c