Don't need to find system_dev

This commit is contained in:
topjohnwu
2020-03-31 22:41:25 -07:00
parent 5537b083a8
commit 543ce937ec
4 changed files with 4 additions and 15 deletions

View File

@ -270,8 +270,10 @@ void SARBase::patch_rootdir() {
sbin_overlay(self, config);
// Mount system_root mirror
struct stat st;
xstat("/", &st);
xmkdir(ROOTMIR, 0755);
mknod(ROOTBLK, S_IFBLK | 0600, system_dev);
mknod(ROOTBLK, S_IFBLK | 0600, st.st_dev);
if (xmount(ROOTBLK, ROOTMIR, "ext4", MS_RDONLY, nullptr))
xmount(ROOTBLK, ROOTMIR, "erofs", MS_RDONLY, nullptr);