From b0265341c2e47cbda3056570dd5533afdbccd036 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 17 Jul 2001 20:39:02 +0000 Subject: don't allow --event to be used with --cmd/--run (#49203) --- src/initlog.1 | 2 +- src/initlog.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/initlog.1 b/src/initlog.1 index 87eaf8d3..5d50bf90 100644 --- a/src/initlog.1 +++ b/src/initlog.1 @@ -33,7 +33,7 @@ Execute the specified program, logging anything output to stdout or stderr. .TP .I "\-e, \-\-event=[number]" -Logs that the specified event happened. Usually used in conjuction +Logs that the specified event happened. Used in conjuction with \fB\-\-name\fR. Currently specified events are: .nf \fB1\fR the action completed successfully diff --git a/src/initlog.c b/src/initlog.c index 5905e16c..39579eeb 100644 --- a/src/initlog.c +++ b/src/initlog.c @@ -413,6 +413,11 @@ int processArgs(int argc, char **argv, int silent) { fprintf(stderr, _("--name requires one of --event or --string\n")); return -1; } + if (cmdevent && cmd) { + if (!silent) + fprintf(stderr, _("--cmd and --run are incompatible with --event\n")); + return -1; + } if (conffile) { readConfiguration(conffile); } else { -- cgit v1.2.1