aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2003-12-15 08:06:52 +0000
committerWayne Davison <wayned@samba.org>2003-12-15 08:06:52 +0000
commit1bca1de6cc45c8215a42442096a8f64241eebcae (patch)
tree413a78655643e1ccbdbff7f9fc4a1fd2a48e4819
parente0ed4e4087ebeff0b0fe8f3419bcccf84fbd89a9 (diff)
downloadandroid_external_rsync-1bca1de6cc45c8215a42442096a8f64241eebcae.tar.gz
android_external_rsync-1bca1de6cc45c8215a42442096a8f64241eebcae.tar.bz2
android_external_rsync-1bca1de6cc45c8215a42442096a8f64241eebcae.zip
Handle new RERR_VANISHED error.
-rw-r--r--log.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/log.c b/log.c
index 30eb04de..29fdd1cc 100644
--- a/log.c
+++ b/log.c
@@ -53,6 +53,7 @@ struct {
{ RERR_WAITCHILD , "some error returned by waitpid()" },
{ RERR_MALLOC , "error allocating core memory buffers" },
{ RERR_PARTIAL , "some files could not be transferred" },
+ { RERR_VANISHED , "some files vanished before they could be transfered" },
{ RERR_TIMEOUT , "timeout in data send/receive" },
{ RERR_CMD_FAILED , "remote shell failed" },
{ RERR_CMD_KILLED , "remote shell killed" },
@@ -567,7 +568,13 @@ void log_exit(int code, const char *file, int line)
if (!name)
name = "unexplained error";
- rprintf(FERROR,"rsync error: %s (code %d) at %s(%d)\n",
- name, code, file, line);
+ /* VANISHED is not an error, only a warning */
+ if (code == RERR_VANISHED) {
+ rprintf(FINFO, "rsync warning: %s (code %d) at %s(%d)\n",
+ name, code, file, line);
+ } else {
+ rprintf(FERROR, "rsync error: %s (code %d) at %s(%d)\n",
+ name, code, file, line);
+ }
}
}