diff options
author | Hong-Mei Li <a21834@motorola.com> | 2014-06-02 22:41:19 -0700 |
---|---|---|
committer | Hong-Mei Li <a21834@motorola.com> | 2014-06-02 22:45:37 -0700 |
commit | 88f7683d9c935f31ba118defd2ec91de7f5cf11d (patch) | |
tree | 5a69bb60c806bdb640a19136ea56d2391ed6a77c | |
parent | bf0f25905b12581f05b65b1ebe95211c727ae483 (diff) | |
download | system_core-88f7683d9c935f31ba118defd2ec91de7f5cf11d.zip system_core-88f7683d9c935f31ba118defd2ec91de7f5cf11d.tar.gz system_core-88f7683d9c935f31ba118defd2ec91de7f5cf11d.tar.bz2 |
libcutils: fix rw FS remount check issue
In some condition, some of FS would set disable_roll_forward option.
In this case, when we do power off or reboot, the power down progress
would stuck at android_reboot for 360 sec.
The reason is, remount_ro_done function check key word "rw" to determine
whether all the read-write FS has been remounted as read-only FS.
Unfortunately, it takes disable_roll_forward as a rw flag too by
mistake, so the check would always fail, until reach 360 sec threshold.
The patch would match "rw," from mount options, this can avoid the issue
successfully.
Change-Id: I409f9dc88c9ee5cf049615ea9dcccaf195b6bc5a
Signed-off-by: Hong-Mei Li <a21834@motorola.com>
-rw-r--r-- | libcutils/android_reboot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcutils/android_reboot.c b/libcutils/android_reboot.c index b7895fa..5d98295 100644 --- a/libcutils/android_reboot.c +++ b/libcutils/android_reboot.c @@ -57,7 +57,7 @@ static int remount_ro_done(void) mount_dir[255] = 0; mount_type[255] = 0; mount_opts[255] = 0; - if ((match == 6) && !strncmp(mount_dev, "/dev/block", 10) && strstr(mount_opts, "rw")) { + if ((match == 6) && !strncmp(mount_dev, "/dev/block", 10) && strstr(mount_opts, "rw,")) { found_rw_fs = 1; break; } |