summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Friederich <dfriederich@magicleap.com>2016-12-14 11:28:28 -0600
committerDaniel Friederich <dfriederich@magicleap.com>2016-12-14 12:41:43 -0600
commitb64413485815e1bb09c5041bf8556428378b3a97 (patch)
treef2ce07c6410da8e7eb2e1281f4819820c8fc9648
parent557359863c0d1fcda9a85e3b7fb275cb12a3eb70 (diff)
downloadsystem_core-b64413485815e1bb09c5041bf8556428378b3a97.tar.gz
system_core-b64413485815e1bb09c5041bf8556428378b3a97.tar.bz2
system_core-b64413485815e1bb09c5041bf8556428378b3a97.zip
adb: fix adb trace tag
The ADB trace enum value collided with the 0 values used to mean all, hence it was not possible to just trace the ADB tagged messages without also tracing everything else. Change-Id: I15ff9c50c4ac01806c4841cf8213ce859faf130b Test: Manually by setting ADB_TRACE and running adb, e.g. "ADB_TRACE=adb adb shell ls"
-rw-r--r--adb/adb_trace.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/adb/adb_trace.cpp b/adb/adb_trace.cpp
index 002d06116..c369d6077 100644
--- a/adb/adb_trace.cpp
+++ b/adb/adb_trace.cpp
@@ -109,8 +109,8 @@ static void setup_trace_mask() {
}
std::unordered_map<std::string, int> trace_flags = {
- {"1", 0},
- {"all", 0},
+ {"1", -1},
+ {"all", -1},
{"adb", ADB},
{"sockets", SOCKETS},
{"packets", PACKETS},
@@ -133,8 +133,8 @@ static void setup_trace_mask() {
continue;
}
- if (flag->second == 0) {
- // 0 is used for the special values "1" and "all" that enable all
+ if (flag->second == -1) {
+ // -1 is used for the special values "1" and "all" that enable all
// tracing.
adb_trace_mask = ~0;
return;