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
- Don't log a delete message to the daemon log in dry-run mode.
[rsync/rsync.git]
/
log.c
diff --git
a/log.c
b/log.c
index
b2c46a7
..
47fbf15
100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-27,6
+27,7
@@
*/
#include "rsync.h"
*/
#include "rsync.h"
+extern int dry_run;
extern int am_daemon;
extern int am_server;
extern int am_sender;
extern int am_daemon;
extern int am_server;
extern int am_sender;
@@
-534,7
+535,7
@@
void log_delete(char *fname, int mode)
if (S_ISDIR(mode))
len++; /* directories include trailing null */
send_msg(MSG_DELETED, fname, len);
if (S_ISDIR(mode))
len++; /* directories include trailing null */
send_msg(MSG_DELETED, fname, len);
- if (!am_daemon)
+ if (!am_daemon
|| dry_run
)
return;
fmt = lp_log_format(module_id);
code = FLOG;
return;
fmt = lp_log_format(module_id);
code = FLOG;
@@
-556,7
+557,7
@@
void log_delete(char *fname, int mode)
void log_exit(int code, const char *file, int line)
{
if (code == 0) {
void log_exit(int code, const char *file, int line)
{
if (code == 0) {
- rprintf(FLOG,"
wrote %.0f bytes rea
d %.0f bytes total size %.0f\n",
+ rprintf(FLOG,"
sent %.0f bytes receive
d %.0f bytes total size %.0f\n",
(double)stats.total_written,
(double)stats.total_read,
(double)stats.total_size);
(double)stats.total_written,
(double)stats.total_read,
(double)stats.total_size);