rprintf(FINFO, "send_files(%d, %s)\n", i, fname);
if (dry_run) {
rprintf(FINFO, "send_files(%d, %s)\n", i, fname);
if (dry_run) {
- rprintf(FERROR, "send_files failed to open %s: %s\n",
- full_fname(fname), strerror(errno));
+ rsyserr(FERROR, errno,
+ "send_files failed to open %s",
+ full_fname(fname));
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
rprintf(FINFO, "send_files mapped %s of size %.0f\n",
fname, (double)st.st_size);
rprintf(FINFO, "send_files mapped %s of size %.0f\n",
fname, (double)st.st_size);
if (verbose > 2 && !read_batch)
rprintf(FINFO, "calling match_sums %s\n", fname);
if (verbose > 2 && !read_batch)
rprintf(FINFO, "calling match_sums %s\n", fname);
} else { /* not checksum match */
rprintf (FINFO, "readbatch & checksums don't match\n");
rprintf (FINFO, "filename=%s is being skipped\n", fname);
continue;
}
} else { /* not checksum match */
rprintf (FINFO, "readbatch & checksums don't match\n");
rprintf (FINFO, "filename=%s is being skipped\n", fname);
continue;
}
- } else {
- match_sums(f_out, s, buf, st.st_size);
+ } else { /* not read_batch */
+ match_sums(f_out, s, mbuf, st.st_size);
- rprintf(FERROR,
- "read errors mapping %s: (%d) %s\n",
- full_fname(fname), j, strerror(j));
+ rsyserr(FERROR, j,
+ "read errors mapping %s",
+ full_fname(fname));