Files
android_bootable_recovery/libblkid
Gao Xiang 70b83292d6 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 <hsiangkao@redhat.com>
[@pomelohan: Adapt for TWRP's libblkid version and add erofs.c to build]
Co-authored-by: GarfieldHan <2652609017@qq.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: I00263757b5b6ed881165e65795ef849d86763165
2021-12-09 00:18:38 +00:00
..
2015-01-05 04:38:42 +01:00
2018-08-24 11:17:39 -05:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00
2015-01-05 04:38:42 +01:00