Mercurial > hg > toybox
comparison toys/cat.c @ 281:1c160cadf5b9
Thinko in cat.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 09 Apr 2008 00:22:04 -0500 |
parents | 0ca2fcee572b |
children | d1ae502ee190 |
comparison
equal
deleted
inserted
replaced
280:d1a548bbd0dd | 281:1c160cadf5b9 |
---|---|
26 | 26 |
27 for (;;) { | 27 for (;;) { |
28 len = xread(fd, toybuf, size); | 28 len = xread(fd, toybuf, size); |
29 if (len<0) toys.exitval = EXIT_FAILURE; | 29 if (len<0) toys.exitval = EXIT_FAILURE; |
30 if (len<1) break; | 30 if (len<1) break; |
31 xwrite(1, toybuf, size); | 31 xwrite(1, toybuf, len); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 void cat_main(void) | 35 void cat_main(void) |
36 { | 36 { |