diff options
author | Iliyan Malchev <malchev@google.com> | 2011-03-11 16:27:56 -0800 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-03-11 16:47:53 -0800 |
commit | 201aa88cbaa3db032a6a1fdab55bae128e7a04ab (patch) | |
tree | 3fe9e05a8aa3dc1a5fa0626a05afe3bb48d1e0b0 /roots.c | |
parent | 90415aca670f0d0475a71634880e7c5c81c007c0 (diff) | |
download | bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.zip bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.gz bootable_recovery-201aa88cbaa3db032a6a1fdab55bae128e7a04ab.tar.bz2 |
recovery: mount /sdcard read-only
Change-Id: Ieffafe00cf82620057cacd0629cb60b0e6aad817
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'roots.c')
-rw-r--r-- | roots.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |