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

This commit is contained in:
Treehugger Robot 2019-02-26 05:34:32 +00:00 committed by Gerrit Code Review
commit a24338bff8

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;
}