Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
475c4a3
)
A slight tweak to the logic that calls log_exit().
author
Wayne Davison
<wayned@samba.org>
Tue, 18 Apr 2006 04:45:30 +0000
(
04:45
+0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 18 Apr 2006 04:45:30 +0000
(
04:45
+0000)
log-file.diff
patch
|
blob
|
blame
|
history
diff --git
a/log-file.diff
b/log-file.diff
index
28dec8d
..
7bfc8bc
100644
(file)
--- a/
log-file.diff
+++ b/
log-file.diff
@@
-1,9
+1,9
@@
-This patch allows a non-daemon server and a client rsync to log what they
+This patch allows a non-daemon server and
/or
a client rsync to log what they
are doing, similar to how a daemon logs its actions.
--- old/cleanup.c
+++ new/cleanup.c
are doing, similar to how a daemon logs its actions.
--- old/cleanup.c
+++ new/cleanup.c
-@@ -21,
6 +21,7
@@
+@@ -21,
10 +21,12
@@
#include "rsync.h"
#include "rsync.h"
@@
-11,12
+11,17
@@
are doing, similar to how a daemon logs its actions.
extern int io_error;
extern int keep_partial;
extern int log_got_error;
extern int io_error;
extern int keep_partial;
extern int log_got_error;
-@@ -149,7 +150,7 @@ void _exit_cleanup(int code, const char
+ extern char *partial_dir;
++extern char *logfile_name;
+
+ #ifdef HAVE_SIGACTION
+ static struct sigaction sigact;
+@@ -149,7 +151,7 @@ void _exit_cleanup(int code, const char
code = RERR_PARTIAL;
}
- if (code)
code = RERR_PARTIAL;
}
- if (code)
-+ if (code || am_
server
)
++ if (code || am_
daemon || (am_server && logfile_name)
)
log_exit(code, file, line);
if (verbose > 2) {
log_exit(code, file, line);
if (verbose > 2) {
@@
-121,7
+126,7
@@
are doing, similar to how a daemon logs its actions.
extern int am_root;
extern int am_server;
extern int am_daemon;
extern int am_root;
extern int am_server;
extern int am_daemon;
-@@ -66
3,7 +663
,7 @@ static int try_dests_reg(struct file_str
+@@ -66
1,7 +661
,7 @@ static int try_dests_reg(struct file_str
} else if (itemizing)
itemize(file, ndx, 0, stp, 0, 0, NULL);
if (verbose > 1 && maybe_ATTRS_REPORT) {
} else if (itemizing)
itemize(file, ndx, 0, stp, 0, 0, NULL);
if (verbose > 1 && maybe_ATTRS_REPORT) {
@@
-130,7
+135,7
@@
are doing, similar to how a daemon logs its actions.
? FCLIENT : FINFO;
rprintf(code, "%s is uptodate\n", fname);
}
? FCLIENT : FINFO;
rprintf(code, "%s is uptodate\n", fname);
}
-@@ -68
6,7 +686
,7 @@ static int try_dests_reg(struct file_str
+@@ -68
4,7 +684
,7 @@ static int try_dests_reg(struct file_str
if (maybe_ATTRS_REPORT
&& ((!itemizing && verbose && match_level == 2)
|| (verbose > 1 && match_level == 3))) {
if (maybe_ATTRS_REPORT
&& ((!itemizing && verbose && match_level == 2)
|| (verbose > 1 && match_level == 3))) {
@@
-139,7
+144,7
@@
are doing, similar to how a daemon logs its actions.
? FCLIENT : FINFO;
rprintf(code, "%s%s\n", fname,
match_level == 3 ? " is uptodate" : "");
? FCLIENT : FINFO;
rprintf(code, "%s%s\n", fname,
match_level == 3 ? " is uptodate" : "");
-@@ -74
2,7 +742
,7 @@ static int try_dests_non(struct file_str
+@@ -74
6,7 +746
,7 @@ static int try_dests_non(struct file_str
itemize(file, ndx, 0, &st, changes, 0, lp);
}
if (verbose > 1 && maybe_ATTRS_REPORT) {
itemize(file, ndx, 0, &st, changes, 0, lp);
}
if (verbose > 1 && maybe_ATTRS_REPORT) {
@@
-148,7
+153,7
@@
are doing, similar to how a daemon logs its actions.
? FCLIENT : FINFO;
rprintf(code, "%s is uptodate\n", fname);
}
? FCLIENT : FINFO;
rprintf(code, "%s is uptodate\n", fname);
}
-@@ -130
4,9 +1304
,9 @@ void generate_files(int f_out, struct fi
+@@ -130
9,9 +1309
,9 @@ void generate_files(int f_out, struct fi
if (protocol_version >= 29) {
itemizing = 1;
maybe_ATTRS_REPORT = log_format_has_i ? 0 : ATTRS_REPORT;
if (protocol_version >= 29) {
itemizing = 1;
maybe_ATTRS_REPORT = log_format_has_i ? 0 : ATTRS_REPORT;