[PATCH 4/4] monitor: show index only when -i is not specified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 monitor/main.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/monitor/main.c b/monitor/main.c
index 6096441..f44cdf1 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -133,7 +133,11 @@ int main(int argc, char *argv[])
 	if(!filter_mask)
 		filter_mask = ~0L;
 
-	filter_mask |= PACKET_FILTER_SHOW_INDEX;
+	if (index >= 0)
+		filter_mask &= ~PACKET_FILTER_SHOW_INDEX;
+	else
+		filter_mask |= PACKET_FILTER_SHOW_INDEX;
+
 	filter_mask &= ~PACKET_FILTER_SHOW_DATE;
 	filter_mask |= PACKET_FILTER_SHOW_ACL_DATA;
 	filter_mask |= PACKET_FILTER_SHOW_SCO_DATA;
-- 
1.7.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux