summaryrefslogtreecommitdiffstats
path: root/minadbd/minadbd_services.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-10-12 05:31:29 +0200
committerandroid-build-merger <android-build-merger@google.com>2017-10-12 05:31:29 +0200
commit44ddef71dc941b2b5d8a0d505c6b022af1561f56 (patch)
tree0a2edcca354ed577b051c36f85013740717ae3de /minadbd/minadbd_services.cpp
parentMerge "Add missing includes." am: 3c4e270123 (diff)
parentMerge "Drop -Wno-unused-parameter." (diff)
downloadandroid_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar.gz
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar.bz2
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar.lz
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar.xz
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.tar.zst
android_bootable_recovery-44ddef71dc941b2b5d8a0d505c6b022af1561f56.zip
Diffstat (limited to '')
-rw-r--r--minadbd/minadbd_services.cpp30
1 files changed, 15 insertions, 15 deletions
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;
}