dovecot-2.0: doveadm help <cmd> now also outputs to stdout.
dovecot at dovecot.org
dovecot at dovecot.org
Fri May 28 17:26:42 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/425823ba9fcb
changeset: 11420:425823ba9fcb
user: Timo Sirainen <tss at iki.fi>
date: Fri May 28 15:26:39 2010 +0100
description:
doveadm help <cmd> now also outputs to stdout.
diffstat:
src/doveadm/doveadm.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
diffs (34 lines):
diff -r c3f1a15f50ca -r 425823ba9fcb src/doveadm/doveadm.c
--- a/src/doveadm/doveadm.c Fri May 28 15:24:55 2010 +0100
+++ b/src/doveadm/doveadm.c Fri May 28 15:26:39 2010 +0100
@@ -45,12 +45,17 @@
usage_to(stderr);
}
+static void help_to(const struct doveadm_cmd *cmd, FILE *out)
+{
+ fprintf(out, "doveadm %s %s\n", cmd->name, cmd->short_usage);
+ if (cmd->long_usage != NULL)
+ fprintf(out, "%s", cmd->long_usage);
+ exit(0);
+}
+
void help(const struct doveadm_cmd *cmd)
{
- fprintf(stderr, "doveadm %s %s\n", cmd->name, cmd->short_usage);
- if (cmd->long_usage != NULL)
- fprintf(stderr, "%s", cmd->long_usage);
- exit(0);
+ help_to(cmd, stdout);
}
const char *unixdate2str(time_t timestamp)
@@ -94,7 +99,7 @@
array_foreach(&doveadm_cmds, cmd) {
if (strcmp(cmd->name, str_c(name)) == 0)
- help(cmd);
+ help_to(cmd, stdout);
}
doveadm_mail_try_help_name(str_c(name));
More information about the dovecot-cvs
mailing list