aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Jung <mail@umaxx.net>2016-02-02 23:20:26 +0100
committerJoerg Jung <mail@umaxx.net>2016-02-02 23:20:26 +0100
commit8773326c7a19fc892c384a5427be39d58687e63b (patch)
treebb3026c72ebd7cb861395b18a0599ee8d803546e
parenttweak man page (diff)
downloadOpenSMTPD-extras-8773326c7a19fc892c384a5427be39d58687e63b.tar.xz
OpenSMTPD-extras-8773326c7a19fc892c384a5427be39d58687e63b.zip
document newly introduced '-l' option and sort/rename for consistency
-rw-r--r--extras/wip/filters/filter-trace/filter-trace.86
-rw-r--r--extras/wip/filters/filter-trace/filter_trace.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/extras/wip/filters/filter-trace/filter-trace.8 b/extras/wip/filters/filter-trace/filter-trace.8
index 709e2bc..a36f9f6 100644
--- a/extras/wip/filters/filter-trace/filter-trace.8
+++ b/extras/wip/filters/filter-trace/filter-trace.8
@@ -1,6 +1,6 @@
.\" $OpenBSD: $
.\"
-.\" Copyright (c) 2015, Joerg Jung <jung@openbsd.org>
+.\" Copyright (c) 2015-2016, Joerg Jung <jung@openbsd.org>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
@@ -22,7 +22,7 @@
.Nd smtpd filter for tracing
.Sh SYNOPSIS
.Nm
-.Op Fl dv
+.Op Fl dlv
.Sh DESCRIPTION
.Nm
is a trace filter for
@@ -37,6 +37,8 @@ Debug mode, if this option is specified,
.Nm
will run in the foreground and log to
.Em stderr .
+.It Fl l
+Ignore data content lines.
.It Fl v
Produce more verbose output.
.El
diff --git a/extras/wip/filters/filter-trace/filter_trace.c b/extras/wip/filters/filter-trace/filter_trace.c
index bdbee7d..eb6e7c5 100644
--- a/extras/wip/filters/filter-trace/filter_trace.c
+++ b/extras/wip/filters/filter-trace/filter_trace.c
@@ -108,17 +108,17 @@ on_rollback(uint64_t id)
int
main(int argc, char **argv)
{
- int ch, d = 0, v = 0, lines = 1;
+ int ch, d = 0, l = 1, v = 0;
log_init(1);
- while ((ch = getopt(argc, argv, "dvl")) != -1) {
+ while ((ch = getopt(argc, argv, "dlv")) != -1) {
switch (ch) {
case 'd':
d = 1;
break;
case 'l':
- lines = 0;
+ l = 0;
break;
case 'v':
v |= TRACE_DEBUG;
@@ -142,7 +142,7 @@ main(int argc, char **argv)
filter_api_on_mail(on_mail);
filter_api_on_rcpt(on_rcpt);
filter_api_on_data(on_data);
- if (lines)
+ if (l)
filter_api_on_dataline(on_dataline);
filter_api_on_eom(on_eom);