Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libblkid: add erofs filesystem support
Enhanced Read-Only File System (EROFS) has been included in Linux kernel, many Linux distributions, buildroot and Android AOSP for a while. Plus, nowadays, it's known that EROFS has been commercially used by several Android vendors for their system partitions. This patch adds support for detecting EROFS filesystem to libblkid. Since util-linux/util-linux@cd129b7 introduced blkid_probe_set_block_size function to report filesystem block size, TWRP is using blkid 2.25.0, which means blkid_probe_set_block_size wasn't supported and required, so remove the blkszbits judgement and blkid_probe_set_block_size for fixing building. Test: Add erofs mount point to twrp.flags, build and boot OP4A7A:/ # logcat | grep erofs I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (6)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43. I (6)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (6)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45. I (6)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42. I (0)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (3)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43. I (2)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52. I (2)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45. I (2)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42. I (2)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38. I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58. OP4A7A:/ # cat /tmp/recovery.log | grep erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Current_File_System: erofs Fstab_File_System: erofs Now TWRP can recognize the EROFS filesystem perfectly after setting fs in twrp.flags Signed-off-by: Gao Xiang <[email protected]> [@pomelohan: Adapt for TWRP's libblkid version and add erofs.c to build] Co-authored-by: GarfieldHan <[email protected]> Signed-off-by: GarfieldHan <[email protected]> Change-Id: I00263757b5b6ed881165e65795ef849d86763165
- Loading branch information