dovecot-2.0: doveadm: If command is known not to take any parame...

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 30 17:54:07 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/d651255481dc
changeset: 11244:d651255481dc
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Apr 30 17:54:03 2010 +0300
description:
doveadm: If command is known not to take any parameters, give error if any are given.

diffstat:

 src/doveadm/doveadm-mail.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 40da334e2513 -r d651255481dc src/doveadm/doveadm-mail.c
--- a/src/doveadm/doveadm-mail.c	Fri Apr 30 17:51:00 2010 +0300
+++ b/src/doveadm/doveadm-mail.c	Fri Apr 30 17:54:03 2010 +0300
@@ -267,6 +267,11 @@
 	}
 	argv += optind;
 
+	if (argv[0] != NULL && *cmd->usage_args == '\0') {
+		i_fatal("doveadm %s: Unknown parameter: %s",
+			cmd->name, argv[0]);
+	}
+
 	if (!all_users) {
 		doveadm_mail_single_user(cmd->cmd, username, service_flags,
 					 (const void *)argv);


More information about the dovecot-cvs mailing list