- if (ret <= 0) {
- /* Don't try to write errors back
- * across the stream */
- io_multiplexing_close();
- rprintf(FERROR, RSYNC_NAME
- ": writefd_unbuffered failed to write %ld bytes: phase \"%s\": %s\n",
- (long) len, io_write_phase,
- strerror(errno));
- exit_cleanup(RERR_STREAMIO);
- }
+ /* Don't try to write errors back across the stream. */
+ io_multiplexing_close();
+ rsyserr(FERROR, errno,
+ "writefd_unbuffered failed to write %ld bytes: phase \"%s\"",
+ (long)len, io_write_phase);
+ exit_cleanup(RERR_STREAMIO);
+ }