Busybox echo prints error messages
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 29 Sep 2014 03:52:04 +0000 (20:52 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 29 Sep 2014 03:56:43 +0000 (20:56 -0700)
commit30778de753bcd425c58f06cb350539c83df2f2f2
treee31120eacd65ac086f1eef8c565f2e044ccdbf56
parent4ec8d14ed8b47fc55614689667bce48b877f267f
Busybox echo prints error messages

It was ignoring any errors, depending on which version of echo_main was
being built.  It's a minor pain to detect errors too, due to how glibc
implements fputs, I think.  Clearing and checking errno suffices.

Now, when you echo garbage > /some/9ns/ctlfile, you'll hear about what
went wrong.

If we start building with writev, or whatever, then we may need another
patch.

You'll need to patch busybox, etc.
tools/patches/busybox/bb-echo-perror.patch [new file with mode: 0644]