From ff70f24b3162e7c0e8bebb6a80824cfbd4946ce3 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Wed, 16 Dec 2020 14:58:08 -0800 Subject: [PATCH] monitor: Add option to disable time offset This adds option -N/--no-time which disables the time offset which sometimes is useful when diffing traces where timing information is not relevant. --- monitor/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/monitor/main.c b/monitor/main.c index e6a40703c..0f5eb4a3b 100644 --- a/monitor/main.c +++ b/monitor/main.c @@ -81,6 +81,7 @@ static const struct option main_options[] = { { "tty-speed", required_argument, NULL, 'B' }, { "vendor", required_argument, NULL, 'V' }, { "mgmt", no_argument, NULL, 'M' }, + { "no-time", no_argument, NULL, 'N' }, { "time", no_argument, NULL, 't' }, { "date", no_argument, NULL, 'T' }, { "sco", no_argument, NULL, 'S' }, @@ -119,8 +120,9 @@ int main(int argc, char *argv[]) int opt; struct sockaddr_un addr; - opt = getopt_long(argc, argv, "r:w:a:s:p:i:d:B:V:MtTSAE:PJ:R:vh", - main_options, NULL); + opt = getopt_long(argc, argv, + "r:w:a:s:p:i:d:B:V:MNtTSAE:PJ:R:vh", + main_options, NULL); if (opt < 0) break; @@ -172,6 +174,9 @@ int main(int argc, char *argv[]) case 'M': filter_mask |= PACKET_FILTER_SHOW_MGMT_SOCKET; break; + case 'N': + filter_mask &= ~PACKET_FILTER_SHOW_TIME_OFFSET; + break; case 't': filter_mask &= ~PACKET_FILTER_SHOW_TIME_OFFSET; filter_mask |= PACKET_FILTER_SHOW_TIME; -- 2.47.3