summaryrefslogtreecommitdiffstats
path: root/init/init.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-05-14 12:03:14 -0700
committerElliott Hughes <enh@google.com>2015-05-15 12:18:41 -0700
commit651fae3cbc9183ea1abcccc9b64db49ff76d0e00 (patch)
treef0491dce4b51a80dc0dccc15a5f1b38be35a16b0 /init/init.cpp
parenteb19e766322fb57ccde989e0e35b0ac3e28a4ac2 (diff)
downloadsystem_core-651fae3cbc9183ea1abcccc9b64db49ff76d0e00.zip
system_core-651fae3cbc9183ea1abcccc9b64db49ff76d0e00.tar.gz
system_core-651fae3cbc9183ea1abcccc9b64db49ff76d0e00.tar.bz2
Reduce the coldboot timeout to 1s.
5s was already a ridiculously long time to delay booting, and some OEMs are trying to make it even more insane: https://www.codeaurora.org/cgit/quic/la/platform/system/core/commit/?h=lp&id=fd23edd48272976d2fb333f377242173f92aa343 Let's at least ensure that Nexus and Android One devices don't take forever to boot... Bug: http://b/19899875 Change-Id: I9680c166a759360f34118e51cd0645e12b6bd5c8 (cherry picked from commit c7331d02d1c6b1e51b3a1210506f38fd61819495)
Diffstat (limited to 'init/init.cpp')
-rw-r--r--init/init.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/init/init.cpp b/init/init.cpp
index dd74538..5185f77 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -618,7 +618,10 @@ static int wait_for_coldboot_done_action(int nargs, char **args) {
Timer t;
NOTICE("Waiting for %s...\n", COLDBOOT_DONE);
- if (wait_for_file(COLDBOOT_DONE, COMMAND_RETRY_TIMEOUT)) {
+ // Any longer than 1s is an unreasonable length of time to delay booting.
+ // If you're hitting this timeout, check that you didn't make your
+ // sepolicy regular expressions too expensive (http://b/19899875).
+ if (wait_for_file(COLDBOOT_DONE, 1)) {
ERROR("Timed out waiting for %s\n", COLDBOOT_DONE);
}