trace-cmd listen: Make sure to write everything that was read

It is not guaranteed that everything that is read will be written in one
write() call. Check the return status of write() and repeat the writes if
necessary to make sure all that was read is written.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 file changed