am 40af0929: Fix charger mode on first boot of force encrypt devices

* commit '40af09297f9d60a3cfd4a186ff294cef6255a9df':
  Fix charger mode on first boot of force encrypt devices
This commit is contained in:
Paul Lawrence 2014-09-16 22:43:18 +00:00 committed by Android Git Automerger
commit 48fb175d22
1 changed files with 6 additions and 1 deletions

View File

@ -515,7 +515,12 @@ int do_mount_all(int nargs, char **args)
pid = fork();
if (pid > 0) {
/* Parent. Wait for the child to return */
waitpid(pid, &status, 0);
int wp_ret = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
if (wp_ret < 0) {
/* Unexpected error code. We will continue anyway. */
NOTICE("waitpid failed rc=%d, errno=%d\n", wp_ret, errno);
}
if (WIFEXITED(status)) {
ret = WEXITSTATUS(status);
} else {