Add separate product partition support

This commit is contained in:
topjohnwu
2019-06-29 14:19:10 -07:00
parent f1112fdf37
commit e8b73ba6d1
2 changed files with 20 additions and 5 deletions

View File

@@ -201,9 +201,9 @@ void SARCommon::patch_rootdir() {
sbin_overlay(self, config);
// Mount system_root mirror
xmkdir(MIRRDIR, 0777);
xmkdir(ROOTMIR, 0777);
xmkdir(BLOCKDIR, 0777);
xmkdir(MIRRDIR, 0);
xmkdir(ROOTMIR, 0755);
xmkdir(BLOCKDIR, 0);
mknod(ROOTBLK, S_IFBLK | 0600, system_dev);
if (xmount(ROOTBLK, ROOTMIR, "ext4", MS_RDONLY, nullptr))
xmount(ROOTBLK, ROOTMIR, "erofs", MS_RDONLY, nullptr);