Merge "fs_mgr: overlayfs: system as root can not detect shared blocks (taimen)"

am: a24338bff8

Change-Id: I14c0c136c362dff252ea7d1ffbff7a054e4686d9
This commit is contained in:
Mark Salyzyn 2019-02-25 23:27:06 -08:00 committed by android-build-merger
commit 7880279ac6

View file

@ -157,7 +157,12 @@ bool fs_mgr_overlayfs_enabled(FstabEntry* entry) {
fs_mgr_update_logical_partition(entry);
}
auto save_errno = errno;
errno = 0;
auto has_shared_blocks = fs_mgr_has_shared_blocks(entry->mount_point, entry->blk_device);
// special case for first stage init for system as root (taimen)
if (!has_shared_blocks && (errno == ENOENT) && (entry->blk_device == "/dev/root")) {
has_shared_blocks = true;
}
errno = save_errno;
return has_shared_blocks;
}