diff options
author | Nick Kralevich <nnk@google.com> | 2013-10-24 12:39:29 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-10-24 12:39:29 -0700 |
commit | 0bf7924df19f72258df7b553515bfbc9574d0114 (patch) | |
tree | 4d28393e229d9ab93f546803c699637496c3c9d5 /adb | |
parent | 396f6b7771688c5aeb72138fff4d9415e31ae1da (diff) | |
parent | 917045222a69021eb36aea96708649c709685509 (diff) | |
download | system_core-0bf7924df19f72258df7b553515bfbc9574d0114.zip system_core-0bf7924df19f72258df7b553515bfbc9574d0114.tar.gz system_core-0bf7924df19f72258df7b553515bfbc9574d0114.tar.bz2 |
am 91704522: Don\'t return immediately from reboot commands.
* commit '917045222a69021eb36aea96708649c709685509':
Don't return immediately from reboot commands.
Diffstat (limited to 'adb')
-rw-r--r-- | adb/services.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/adb/services.c b/adb/services.c index f0d5878..951048e 100644 --- a/adb/services.c +++ b/adb/services.c @@ -144,7 +144,11 @@ void reboot_service(int fd, void *arg) if (ret < 0) { snprintf(buf, sizeof(buf), "reboot failed: %d\n", ret); writex(fd, buf, strlen(buf)); + goto cleanup; } + // Don't return early. Give the reboot command time to take effect + // to avoid messing up scripts which do "adb reboot && adb wait-for-device" + while(1) { pause(); } cleanup: free(arg); adb_close(fd); |