summaryrefslogtreecommitdiffstats
path: root/fs_mgr
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2015-06-29 17:33:05 -0700
committerDaniel Rosenberg <drosen@google.com>2015-08-04 00:47:04 +0000
commit31a4fafc156ea4ac7f66d583add0919b5598f248 (patch)
tree6c591dee1c6b45567da34db91cd4a875c0db03a2 /fs_mgr
parent05b9edc207b481bb128b1b7357fe328826850930 (diff)
downloadsystem_core-31a4fafc156ea4ac7f66d583add0919b5598f248.tar.gz
system_core-31a4fafc156ea4ac7f66d583add0919b5598f248.tar.bz2
system_core-31a4fafc156ea4ac7f66d583add0919b5598f248.zip
Skip mounting /, just mark block device as ro if needed.
Change-Id: I7fbb636d296abc1caab6c7bf88017684c9df7759
Diffstat (limited to 'fs_mgr')
-rw-r--r--fs_mgr/fs_mgr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c
index f467f81cf..459daecf2 100644
--- a/fs_mgr/fs_mgr.c
+++ b/fs_mgr/fs_mgr.c
@@ -524,6 +524,14 @@ int fs_mgr_mount_all(struct fstab *fstab)
continue;
}
+ /* Skip mounting the root partition, as it will already have been mounted */
+ if (!strcmp(fstab->recs[i].mount_point, "/")) {
+ if ((fstab->recs[i].fs_mgr_flags & MS_RDONLY) != 0) {
+ fs_mgr_set_blk_ro(fstab->recs[i].blk_device);
+ }
+ continue;
+ }
+
/* Translate LABEL= file system labels into block devices */
if (!strcmp(fstab->recs[i].fs_type, "ext2") ||
!strcmp(fstab->recs[i].fs_type, "ext3") ||