Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added a debug-helping option, --msgs2stderr, than should help all
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
8f8f049
..
5d59419
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-36,6
+36,7
@@
extern int allow_8bit_chars;
extern int protocol_version;
extern int always_checksum;
extern int preserve_times;
extern int protocol_version;
extern int always_checksum;
extern int preserve_times;
+extern int msgs2stderr;
extern int uid_ndx;
extern int gid_ndx;
extern int stdout_format_has_i;
extern int uid_ndx;
extern int gid_ndx;
extern int stdout_format_has_i;
@@
-257,6
+258,11
@@
void rwrite(enum logcode code, const char *buf, int len, int is_utf8)
if (len < 0)
exit_cleanup(RERR_MESSAGEIO);
if (len < 0)
exit_cleanup(RERR_MESSAGEIO);
+ if (msgs2stderr && code != FLOG) {
+ f = stderr;
+ goto output_msg;
+ }
+
if (am_server && msg_fd_out >= 0) {
assert(!is_utf8);
/* Pass the message to our sibling. */
if (am_server && msg_fd_out >= 0) {
assert(!is_utf8);
/* Pass the message to our sibling. */
@@
-323,6
+329,7
@@
void rwrite(enum logcode code, const char *buf, int len, int is_utf8)
exit_cleanup(RERR_MESSAGEIO);
}
exit_cleanup(RERR_MESSAGEIO);
}
+output_msg:
if (output_needs_newline) {
fputc('\n', f);
output_needs_newline = 0;
if (output_needs_newline) {
fputc('\n', f);
output_needs_newline = 0;