Output an FERROR* for a general io_error, and an FWARNING for other
authorWayne Davison <wayned@samba.org>
Thu, 31 Jul 2008 14:59:45 +0000 (07:59 -0700)
committerWayne Davison <wayned@samba.org>
Thu, 31 Jul 2008 14:59:45 +0000 (07:59 -0700)
io_error flags.

exclude.c
flist.c
generator.c
sender.c

index 9672bf9f1fd12b716cec2aa768df06cddde93cc9..6eb83cb6e2e3e395e903860ccc8d98142b372ef4 100644 (file)
--- 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 849851e02febcade4c8242925af683a199a20bb6..fe6d0b91a6f580a4ad2a1501c08fa76a8aaa98fe 100644 (file)
--- 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;
index 58ae82f73a5b8a484dc1599489a7b7041de9e2b8..5a57a0f3c69bb9ca99a703add6742bb0f644adf2 100644 (file)
@@ -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;
index 9c550e963b798ebed2275af5726e9127956b0938..c8ef7ccde000bb5c34418b5ad2d4cdc068c4621a 100644 (file)
--- 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);