diff options
| author | Bowgo Tsai <bowgotsai@google.com> | 2017-09-26 18:03:23 +0800 |
|---|---|---|
| committer | Bowgo Tsai <bowgotsai@google.com> | 2017-09-26 21:06:59 +0800 |
| commit | cc323958f99e40fea06c511656c69c0b2e2d47f7 (patch) | |
| tree | 1a129c1aeb1d71ebfe6f2e90561e2a70f896ade6 /trusty/coverage/coverage_test.cpp | |
| parent | dea5e081ac0f94a83650a600af881b529817b6fd (diff) | |
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
Diffstat (limited to 'trusty/coverage/coverage_test.cpp')
0 files changed, 0 insertions, 0 deletions
