summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIliyan Malchev <malchev@google.com>2011-03-12 01:27:56 +0100
committerIliyan Malchev <malchev@google.com>2011-03-12 01:47:53 +0100
commit201aa88cbaa3db032a6a1fdab55bae128e7a04ab (patch)
tree3fe9e05a8aa3dc1a5fa0626a05afe3bb48d1e0b0
parentam 6e4472ab: Have recovery reboot using the new android_reboot() function. (diff)
downloadandroid_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.gz
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.bz2
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.lz
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.xz
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.zst
android_bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.zip
-rw-r--r--roots.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/roots.c b/roots.c
index cb7e067a1..1143b76bc 100644
--- a/roots.c
+++ b/roots.c
@@ -177,14 +177,15 @@ int ensure_path_mounted(const char* path) {
} else if (strcmp(v->fs_type, "ext4") == 0 ||
strcmp(v->fs_type, "vfat") == 0) {
result = mount(v->device, v->mount_point, v->fs_type,
- MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
+ MS_NOATIME | MS_NODEV | MS_NODIRATIME | MS_RDONLY, "");
if (result == 0) return 0;
if (v->device2) {
LOGW("failed to mount %s (%s); trying %s\n",
v->device, strerror(errno), v->device2);
result = mount(v->device2, v->mount_point, v->fs_type,
- MS_NOATIME | MS_NODEV | MS_NODIRATIME, "");
+ MS_NOATIME | MS_NODEV |
+ MS_NODIRATIME | MS_RDONLY, "");
if (result == 0) return 0;
}