summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-12-16 14:58:08 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2020-12-16 14:58:08 -0800
commitff70f24b3162e7c0e8bebb6a80824cfbd4946ce3 (patch)
treec3106adbbee2f3c0c0dcdee12ee52ec23ccda629
parent57bccce9e59f811517bb3ccf80d3ab22dc8b7bd7 (diff)
downloadbluez-ff70f24b3162e7c0e8bebb6a80824cfbd4946ce3.tar.gz
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.
-rw-r--r--monitor/main.c9
1 files 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;