platform_system_core/fs_mgr
Bowgo Tsai cc323958f9 fs_mgr_fstab: do an exact match when searching a mount point
Currently when searching a mount point from a fstab, it checks whether the
mount point of an fstab entry is the prefix of a given path, and the
next char after the match is either '\0' or '/'.

However, it will always return the fstab entry with mount point
"/vendor" when searching path is "/vendor", "/vendor/abc" or "/vendor/cde"
in the following fstab. Because "/vendor" is the prefix of "/vendor/abc"
and "/vendor/cde", and the next char after the match is '/'.

    /dev/block/platform/.../by-name/vendor   /vendor      ext4  ro  wait
    /dev/block/platform/.../by-name/abc      /vendor/abc  ext4  ro  wait
    /dev/block/platform/.../by-name/cde      /vendor/cde  ext4  ro  wait

Fix this by performing an exact match when searching the mount point.

Bug: 63912287
Test: boot sailfish

Change-Id: I504655f5c71790c5d528085de416ce3c30d21fea
2017-09-26 21:06:59 +08:00
..
include fs_mgr: add libfstab for vendor 2017-06-28 11:24:25 +09:00
include_fstab/fstab Merge changes from topic 'ext4_encryption_flag' 2017-07-14 23:11:43 +00:00
.clang-format Fix-up coding style 2017-02-18 12:33:36 +08:00
Android.bp fs_mgr: replace make_ext4 api with e2fsprogs 2017-09-11 18:34:32 +00:00
Android.mk fs_mgr: replace make_ext4 api with e2fsprogs 2017-09-11 18:34:32 +00:00
fs_mgr.cpp fs_mgr:Add filter condition to make sure that the super block is correct. 2017-07-21 11:35:35 +08:00
fs_mgr_avb.cpp Merge "fs_mgr: Adding logs when failing to wait for a device file" 2017-07-06 04:19:00 +00:00
fs_mgr_avb_ops.cpp fs_mgr: Adding logs when failing to wait for a device file 2017-07-06 09:51:02 +08:00
fs_mgr_boot_config.cpp Allow the use of a custom Android DT directory 2017-07-28 11:10:48 +08:00
fs_mgr_dm_ioctl.cpp Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_format.cpp fs_mgr: replace make_ext4 api with e2fsprogs 2017-09-11 18:34:32 +00:00
fs_mgr_fstab.cpp fs_mgr_fstab: do an exact match when searching a mount point 2017-09-26 21:06:59 +08:00
fs_mgr_main.cpp fs_mgr: Switch to LOG()/PLOG() defined in <android-base/logging.h> 2017-01-26 21:47:55 +08:00
fs_mgr_priv.h Allow the use of a custom Android DT directory 2017-07-28 11:10:48 +08:00
fs_mgr_priv_avb_ops.h first stage mount: removing the requirement of by-name prefix for AVB 2017-05-15 16:49:37 +08:00
fs_mgr_priv_boot_config.h Allow the use of a custom Android DT directory 2017-07-28 11:10:48 +08:00
fs_mgr_priv_dm_ioctl.h Fix-up coding style 2017-02-18 12:33:36 +08:00
fs_mgr_priv_sha.h fs_mgr_avb: refactors how vbmeta is loaded 2017-04-14 21:50:55 +08:00
fs_mgr_slotselect.cpp Reland "Remove comments and code about ro.boot.slot" 2017-09-25 16:04:30 +00:00
fs_mgr_verity.cpp fs_mgr_verity: allow verification error when the device is unlocked 2017-07-19 18:45:40 +08:00