summaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-10-12 05:35:20 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-10-12 05:35:20 +0200
commit1431cbec0b4678aaa8079e5587fa9565a97c0f23 (patch)
tree01275bd4a3688eebc78fa5f1a1e86d32412ca2a8 /minadbd
parentMerge "Add missing includes." am: 3c4e270123 am: b23cfd43da (diff)
parentMerge "Drop -Wno-unused-parameter." am: a0e9742796 (diff)
downloadandroid_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar.gz
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar.bz2
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar.lz
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar.xz
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.tar.zst
android_bootable_recovery-1431cbec0b4678aaa8079e5587fa9565a97c0f23.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;
}