summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adb/adb.cpp4
-rw-r--r--adb/adb_main.cpp6
2 files changed, 6 insertions, 4 deletions
diff --git a/adb/adb.cpp b/adb/adb.cpp
index c2ac674..f64b19f 100644
--- a/adb/adb.cpp
+++ b/adb/adb.cpp
@@ -54,8 +54,6 @@ int HOST = 0;
#if !ADB_HOST
const char *adb_device_banner = "device";
-
-int recovery_mode = 0;
#endif
void fatal(const char *fmt, ...)
@@ -196,8 +194,6 @@ void adb_trace_init() {
#if !ADB_HOST
start_device_log();
-
- recovery_mode = (strcmp(adb_device_banner, "recovery") == 0);
#endif
}
diff --git a/adb/adb_main.cpp b/adb/adb_main.cpp
index 1ff305b..4025fbe 100644
--- a/adb/adb_main.cpp
+++ b/adb/adb_main.cpp
@@ -361,6 +361,10 @@ void close_stdin() {
}
#endif
+#if !ADB_HOST
+int recovery_mode = 0;
+#endif
+
// TODO(danalbert): Split this file up into adb_main.cpp and adbd_main.cpp.
int main(int argc, char **argv) {
#if ADB_HOST
@@ -399,6 +403,8 @@ int main(int argc, char **argv) {
}
}
+ recovery_mode = (strcmp(adb_device_banner, "recovery") == 0);
+
close_stdin();
adb_trace_init();