dovecot-2.1: rawlog: Renamed -i / -o parameters to "-f in", "-f ...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 6 19:34:30 EET 2012


details:   http://hg.dovecot.org/dovecot-2.1/rev/664778adec21
changeset: 14066:664778adec21
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 06 19:34:18 2012 +0200
description:
rawlog: Renamed -i / -o parameters to "-f in", "-f out"
This is mainly to get give the -i parameter to lib-master.

diffstat:

 src/util/rawlog.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (35 lines):

diff -r 66f875b5102b -r 664778adec21 src/util/rawlog.c
--- a/src/util/rawlog.c	Mon Feb 06 19:30:12 2012 +0200
+++ b/src/util/rawlog.c	Mon Feb 06 19:34:18 2012 +0200
@@ -362,14 +362,16 @@
 	int c;
 
 	master_service = master_service_init("rawlog", 0,
-					     &argc, &argv, "+iobt");
+					     &argc, &argv, "+f:obt");
 	while ((c = master_getopt(master_service)) > 0) {
 		switch (c) {
-		case 'i':
-			flags &= ~RAWLOG_FLAG_LOG_OUTPUT;
-			break;
-		case 'o':
-			flags &= ~RAWLOG_FLAG_LOG_INPUT;
+		case 'f':
+			if (strcmp(optarg, "in") == 0)
+				flags &= ~RAWLOG_FLAG_LOG_OUTPUT;
+			else if (strcmp(optarg, "out") == 0)
+				flags &= ~RAWLOG_FLAG_LOG_INPUT;
+			else
+				i_fatal("Invalid filter: %s", optarg);
 			break;
 		case 'b':
 			flags |= RAWLOG_FLAG_LOG_BOUNDARIES;
@@ -385,7 +387,7 @@
 	argv += optind;
 
 	if (argc < 1)
-		i_fatal("Usage: rawlog [-i | -o] [-b] [-t] <binary> <arguments>");
+		i_fatal("Usage: rawlog [-f in|out] [-b] [-t] <binary> <arguments>");
 
 	master_service_init_log(master_service, "rawlog: ");
 	master_service_init_finish(master_service);


More information about the dovecot-cvs mailing list