using -v and -q together

Wayne Davison wayned at samba.org
Sun May 14 00:26:20 GMT 2006


On Sat, May 13, 2006 at 04:27:02PM -0400, Mike Frysinger wrote:
> seems the behavior of rsync has changed when dealing with output and using 
> both -v and -q at the same time

This comes about because of the new rprintf() enums that the newer code
is using, especially the latest CVS version, which has expanded the use
of FCLIENT.

I think that the best solution is to tweak the code a little so that
quiet just allows FERROR messages through, but make the check late
enough that the more complex codes (such as FSOCKERR and FLOG) have
already been sorted out.  Attached is a patch for the CVS version
(which should also work on earlier versions).

Thanks for pointing this out!

..wayne..
-------------- next part --------------
--- log.c	9 May 2006 18:31:10 -0000	1.150
+++ log.c	14 May 2006 00:21:40 -0000
@@ -224,9 +224,6 @@ void rwrite(enum logcode code, char *buf
 	if (len < 0)
 		exit_cleanup(RERR_MESSAGEIO);
 
-	if (quiet && code == FINFO)
-		return;
-
 	if (am_server && msg_fd_out >= 0) {
 		/* Pass the message to our sibling. */
 		send_msg((enum msgcode)code, buf, len);
@@ -258,6 +255,9 @@ void rwrite(enum logcode code, char *buf
 	} else if (code == FLOG)
 		return;
 
+	if (quiet && code != FERROR)
+		return;
+
 	if (am_server) {
 		/* Pass the message to the non-server side. */
 		if (send_msg((enum msgcode)code, buf, len))


More information about the rsync mailing list