summaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-10-13 21:46:38 +0200
committerTao Bao <tbao@google.com>2017-10-12 01:56:12 +0200
commit99f0d9e52bdbe314d77300f883d66e4470d4a5ee (patch)
tree1f2d542a9d43d56366dd20dedd607c678adb7bc7 /minadbd
parentMerge "applypatch: Use shared libs for libbase/libcrypto/liblog/libziparchive." (diff)
downloadandroid_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar.gz
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar.bz2
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar.lz
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar.xz
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.tar.zst
android_bootable_recovery-99f0d9e52bdbe314d77300f883d66e4470d4a5ee.zip
Diffstat (limited to 'minadbd')
-rw-r--r--minadbd/Android.mk17
-rw-r--r--minadbd/minadbd_services.cpp30
2 files changed, 31 insertions, 16 deletions
diff --git a/minadbd/Android.mk b/minadbd/Android.mk
index 8d86fd653..803171d99 100644
--- a/minadbd/Android.mk
+++ b/minadbd/Android.mk
@@ -1,13 +1,26 @@
# Copyright 2005 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
LOCAL_PATH:= $(call my-dir)
minadbd_cflags := \
-Wall -Werror \
- -Wno-unused-parameter \
-Wno-missing-field-initializers \
-DADB_HOST=0 \
+# libadbd (static library)
+# ===============================
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
@@ -24,6 +37,8 @@ LOCAL_STATIC_LIBRARIES := libcrypto libbase
include $(BUILD_STATIC_LIBRARY)
+# minadbd_test (native test)
+# ===============================
include $(CLEAR_VARS)
LOCAL_MODULE := minadbd_test
diff --git a/minadbd/minadbd_services.cpp b/minadbd/minadbd_services.cpp
index 61c06cc0a..9f0f1f87d 100644
--- a/minadbd/minadbd_services.cpp
+++ b/minadbd/minadbd_services.cpp
@@ -58,20 +58,20 @@ static int create_service_thread(void (*func)(int, const std::string&), const st
return s[0];
}
-int service_to_fd(const char* name, const atransport* transport) {
- int ret = -1;
+int service_to_fd(const char* name, const atransport* /* transport */) {
+ int ret = -1;
- if (!strncmp(name, "sideload:", 9)) {
- // this exit status causes recovery to print a special error
- // message saying to use a newer adb (that supports
- // sideload-host).
- exit(3);
- } else if (!strncmp(name, "sideload-host:", 14)) {
- std::string arg(name + 14);
- ret = create_service_thread(sideload_host_service, arg);
- }
- if (ret >= 0) {
- close_on_exec(ret);
- }
- return ret;
+ if (!strncmp(name, "sideload:", 9)) {
+ // this exit status causes recovery to print a special error
+ // message saying to use a newer adb (that supports
+ // sideload-host).
+ exit(3);
+ } else if (!strncmp(name, "sideload-host:", 14)) {
+ std::string arg(name + 14);
+ ret = create_service_thread(sideload_host_service, arg);
+ }
+ if (ret >= 0) {
+ close_on_exec(ret);
+ }
+ return ret;
}