summaryrefslogtreecommitdiffstats
path: root/adb
diff options
context:
space:
mode:
Diffstat (limited to 'adb')
-rw-r--r--adb/services.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/adb/services.c b/adb/services.c
index f0d587817..951048e58 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -144,7 +144,11 @@ void reboot_service(int fd, void *arg)
144 if (ret < 0) { 144 if (ret < 0) {
145 snprintf(buf, sizeof(buf), "reboot failed: %d\n", ret); 145 snprintf(buf, sizeof(buf), "reboot failed: %d\n", ret);
146 writex(fd, buf, strlen(buf)); 146 writex(fd, buf, strlen(buf));
147 goto cleanup;
147 } 148 }
149 // Don't return early. Give the reboot command time to take effect
150 // to avoid messing up scripts which do "adb reboot && adb wait-for-device"
151 while(1) { pause(); }
148cleanup: 152cleanup:
149 free(arg); 153 free(arg);
150 adb_close(fd); 154 adb_close(fd);