The fstab struct wasn't properly being freed.
Test: Ensure a user of fs_mgr (vold) runs without errors.
Change-Id: I4dcb8ae2ab3e831fbdb13372eb31a67a5d9fb735
Current syntax of the fstab in device tree (fstab_dt) assumes the
node name is the mount point, which doesn't allow subdir:
vendor { <== using "vendor/abc" leads to syntax error in device tree
compatible = "android,vendor";
dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor";
type = "ext4";
mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
fsmgr_flags = "wait";
};
This CL adds a new field "mnt_point" in the fstab_dt configuration:
vendor_abc {
compatible = "android,vendor_abc";
dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/abc";
type = "ext4";
mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
mnt_point = "/vendor/abc"; <== new field
fsmgr_flags = "wait";
};
The new field is optional and will fallback to using node name as mount
point if it is absent.
Note that this CL also sorts fstab_dt by mount point, because
/vendor needs to be mounted first, which contains a directory
/vendor/abc, before /vendor/abc can be mounted.
Bug: 69955336
Test: first stage mount /vendor/abc on a device
Change-Id: Ie2e519f9801f211a7a221622f32c82bedd00353f
This patch adds -O quota for make_f2fs to activate disk quotas, and add -d1 to
show debug messages which was set in all the other make_f2fs calls.
Change-Id: I33ab0f585b1081ff88f298286378f9ff70579b3f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
The client of FirstStageMount class should check the existence of fstab
in device-tree prior to using it. So raising a FATAL error inside
FirstStageMount when failed to parsing the fstab, in order to expose
more accurate error messages.
Also fixing a comment in fs_mgr, where it might happen in either
non-A/B or A/B.
Bug: 69102431
Test: boot sailfish
Change-Id: Ifb525beaa3423b118644778bfe0f84bff9465303
This change adds fstab.${ro.boot.hardware.platform} file into list of
searched fstab filenames.
The ${ro.boot.hardware.platform} helps consolidate init sequence based
on platform. Potentially it allows same build serve different devices.
Bug: 68663168
Change-Id: I822d5bc432e823218ebc640093cfbe5e9271d3b1
Previously there is no vboot 1.0 metadata for ENG builds. It relies on
is_device_secure() to query "ro.secure" and skip setting up dm-verity
if the value is 0 (meaning ENG build).
This change will be submitted together with other changes to add vboot
1.0 metadata for ENG builds with a "disable magic". The resulting
metadata will be the same as triggering an "adb disable-verity" on an
USERDEBUG image.
Bug: 63056044
Test: boot sailfish eng/userdebug builds
Change-Id: I35eef771e1b30bfc6d01b8ed76b40c942fe7b783
This is needed if they will ever handle ro. properties that have
values longer than 92 characters.
Bug: 23102347
Bug: 34954705
Test: read and write properties with value length > 92 characters
Change-Id: I44aa135c97ec010f12162c30f743387810ae2c5d
fs_mgr isn't usable by C now as we've migrated all fs_mgr clients in AOSP
to CPP. Removing the support for C clients.
Bug: 67024518
Bug: 67444051
Test: boot sailfish
Change-Id: Iac57f51eb6a524c6dcdc625c83af75602b4f9b3b
No fs_mgr client is using fs_mgr_get_entry_for_mount_point_after(), which
supports matching a mount point iteratively by specifying a starting entry
in the fstab. So removes it.
Also switch the public API from C/C++ to C++-only:
fs_mgr_get_entry_for_mount_point(struct fstab* fstab, const char* path);
==> fs_mgr_get_entry_for_mount_point(struct fstab* fstab, const std::string& path);
Bug: 67024518
Test: boot sailfish, manually test fs_mgr_get_entry_for_mount_point().
Change-Id: I38e18fa6bd9485b6cd31b55474406a511df3f506
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