summaryrefslogtreecommitdiffstats
path: root/reboot/reboot.c
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-10-24 08:53:48 -0700
committerNick Kralevich <nnk@google.com>2013-10-24 11:01:16 -0700
commit917045222a69021eb36aea96708649c709685509 (patch)
tree53ba3f23a6a4449175f84730cfafe4dffae7b8c2 /reboot/reboot.c
parenta9e453f1b552699f69dca19599c7624a581089bd (diff)
downloadsystem_core-917045222a69021eb36aea96708649c709685509.tar.gz
system_core-917045222a69021eb36aea96708649c709685509.tar.bz2
system_core-917045222a69021eb36aea96708649c709685509.zip
Don't return immediately from reboot commands.
The reboot commands return too fast, interfering with testing. Add a pause(), which will allow the device time to complete the reboot. Change-Id: Ie9cc6eea67b7ff662ec71ea2329cbb94f8d55404 Bug: 11369303
Diffstat (limited to 'reboot/reboot.c')
-rw-r--r--reboot/reboot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/reboot/reboot.c b/reboot/reboot.c
index 0e5170d42..d9a422764 100644
--- a/reboot/reboot.c
+++ b/reboot/reboot.c
@@ -68,6 +68,11 @@ int main(int argc, char *argv[])
perror("reboot");
exit(EXIT_FAILURE);
}
+
+ // Don't return early. Give the reboot command time to take effect
+ // to avoid messing up scripts which do "adb shell reboot && adb wait-for-device"
+ while(1) { pause(); }
+
fprintf(stderr, "Done\n");
return 0;
}