summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-07-31 07:59:45 -0700
committerWayne Davison <wayned@samba.org>2008-07-31 07:59:45 -0700
commit342bfb5e23ebb372e0b1230f8124a4312f8a66d8 (patch)
tree7297393faa684626163e9a2ccdcde8c0cb38d680
parent1fe0d1426309308128f0622452063f26de2ce590 (diff)
downloadrsync-342bfb5e23ebb372e0b1230f8124a4312f8a66d8.tar.gz
Output an FERROR* for a general io_error, and an FWARNING for other
io_error flags.
-rw-r--r--exclude.c2
-rw-r--r--flist.c12
-rw-r--r--generator.c2
-rw-r--r--sender.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/exclude.c b/exclude.c
index 9672bf9f..6eb83cb6 100644
--- a/exclude.c
+++ b/exclude.c
@@ -475,7 +475,7 @@ void *push_local_filters(const char *dir, unsigned int dirlen)
XFLG_ANCHORED2ABS);
} else {
io_error |= IOERR_GENERAL;
- rprintf(FINFO,
+ rprintf(FERROR,
"cannot add local filter rules in long-named directory: %s\n",
full_fname(dirbuf));
}
diff --git a/flist.c b/flist.c
index 849851e0..fe6d0b91 100644
--- a/flist.c
+++ b/flist.c
@@ -376,7 +376,7 @@ int change_pathname(struct file_struct *file, const char *dir, int dirlen)
if (!change_dir(dir, CD_NORMAL)) {
chdir_error:
io_error |= IOERR_GENERAL;
- rsyserr(FERROR, errno, "change_dir %s failed", full_fname(dir));
+ rsyserr(FERROR_XFER, errno, "change_dir %s failed", full_fname(dir));
if (dir != orig_dir)
change_dir(orig_dir, CD_NORMAL);
pathname = NULL;
@@ -693,7 +693,7 @@ static struct file_struct *recv_file_entry(struct file_list *flist,
if (iconvbufs(ic_recv, &inbuf, &outbuf, 0) < 0) {
io_error |= IOERR_GENERAL;
- rprintf(FINFO,
+ rprintf(FERROR_XFER,
"[%s] cannot convert filename: %s (%s)\n",
who_am_i(), lastname, strerror(errno));
outbuf.len = 0;
@@ -1068,7 +1068,7 @@ struct file_struct *make_file(const char *fname, struct file_list *flist,
if (strlcpy(thisname, fname, sizeof thisname) >= sizeof thisname) {
io_error |= IOERR_GENERAL;
- rprintf(FINFO, "skipping overly long name: %s\n", fname);
+ rprintf(FERROR_XFER, "skipping overly long name: %s\n", fname);
return NULL;
}
clean_fname(thisname, 0);
@@ -1362,7 +1362,7 @@ static struct file_struct *send_file_name(int f, struct file_list *flist,
if (iconvbufs(ic_send, &inbuf, &outbuf, 0) < 0) {
convert_error:
io_error |= IOERR_GENERAL;
- rprintf(FINFO,
+ rprintf(FERROR_XFER,
"[%s] cannot convert filename: %s (%s)\n",
who_am_i(), f_name(file, fbuf), strerror(errno));
return NULL;
@@ -1587,14 +1587,14 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
continue;
if (strlcpy(p, dname, remainder) >= remainder) {
io_error |= IOERR_GENERAL;
- rprintf(FINFO,
+ rprintf(FERROR_XFER,
"cannot send long-named file %s\n",
full_fname(fbuf));
continue;
}
if (dname[0] == '\0') {
io_error |= IOERR_GENERAL;
- rprintf(FINFO,
+ rprintf(FERROR_XFER,
"cannot send file with empty name in %s\n",
full_fname(fbuf));
continue;
diff --git a/generator.c b/generator.c
index 58ae82f7..5a57a0f3 100644
--- a/generator.c
+++ b/generator.c
@@ -2336,7 +2336,7 @@ void generate_files(int f_out, const char *local_name)
touch_up_dirs(dir_flist, -1);
if (max_delete >= 0 && deletion_count > max_delete) {
- rprintf(FINFO,
+ rprintf(FWARNING,
"Deletions stopped due to --max-delete limit (%d skipped)\n",
deletion_count - max_delete);
io_error |= IOERR_DEL_LIMIT;
diff --git a/sender.c b/sender.c
index 9c550e96..c8ef7ccd 100644
--- a/sender.c
+++ b/sender.c
@@ -283,7 +283,7 @@ void send_files(int f_in, int f_out)
if (!(s = receive_sums(f_in))) {
io_error |= IOERR_GENERAL;
- rprintf(FERROR, "receive_sums failed\n");
+ rprintf(FERROR_XFER, "receive_sums failed\n");
exit_cleanup(RERR_PROTOCOL);
}
@@ -311,7 +311,7 @@ void send_files(int f_in, int f_out)
/* map the local file */
if (do_fstat(fd, &st) != 0) {
io_error |= IOERR_GENERAL;
- rsyserr(FERROR, errno, "fstat failed");
+ rsyserr(FERROR_XFER, errno, "fstat failed");
free_sums(s);
close(fd);
exit_cleanup(RERR_PROTOCOL);