diff options
author | Ken Sumrall <ksumrall@android.com> | 2013-02-13 12:58:40 -0800 |
---|---|---|
committer | Ken Sumrall <ksumrall@android.com> | 2013-02-19 10:18:42 -0800 |
commit | ab6b852235d99d752678312c155a3f1c140fb483 (patch) | |
tree | 0ec27d646225731c2b8c7b850b7390e48822d9ea /fs_mgr/include | |
parent | 9e76a29752ff9d047e98c34c1cb93e7e2a27ebcd (diff) | |
download | system_core-ab6b852235d99d752678312c155a3f1c140fb483.zip system_core-ab6b852235d99d752678312c155a3f1c140fb483.tar.gz system_core-ab6b852235d99d752678312c155a3f1c140fb483.tar.bz2 |
fs_mgr: support a unified fstab format.
Update fs_mgr to support more flags needed to unify the 3
fstabs currently in android into one.
Change-Id: Ie46cea61a5b19882c55098bdd70f39e78fb603be
Diffstat (limited to 'fs_mgr/include')
-rw-r--r-- | fs_mgr/include/fs_mgr.h | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h index 76abb83..05bcc1b 100644 --- a/fs_mgr/include/fs_mgr.h +++ b/fs_mgr/include/fs_mgr.h @@ -17,11 +17,48 @@ #ifndef __CORE_FS_MGR_H #define __CORE_FS_MGR_H -int fs_mgr_mount_all(char *fstab_file); -int fs_mgr_do_mount(char *fstab_file, char *n_name, char *n_blk_dev, char *tmp_mnt_point); +#ifdef __cplusplus +extern "C" { +#endif + +struct fstab { + int num_entries; + struct fstab_rec *recs; + char *fstab_filename; +}; + +struct fstab_rec { + char *blk_device; + char *mount_point; + char *fs_type; + unsigned long flags; + char *fs_options; + int fs_mgr_flags; + char *key_loc; + long long length; + char *label; + int partnum; +}; + +struct fstab *fs_mgr_read_fstab(const char *fstab_path); +void fs_mgr_free_fstab(struct fstab *fstab); +int fs_mgr_mount_all(struct fstab *fstab); +int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device, + char *tmp_mount_point); int fs_mgr_do_tmpfs_mount(char *n_name); -int fs_mgr_unmount_all(char *fstab_file); -int fs_mgr_get_crypt_info(char *fstab_file, char *key_loc, char *real_blk_dev, int size); +int fs_mgr_unmount_all(struct fstab *fstab); +int fs_mgr_get_crypt_info(struct fstab *fstab, char *key_loc, + char *real_blk_device, int size); +int fs_mgr_add_entry(struct fstab *fstab, + const char *mount_point, const char *fs_type, + const char *blk_device, long long length); +struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const char *path); +int fs_mgr_is_voldmanaged(struct fstab_rec *fstab); +int fs_mgr_is_nonremovable(struct fstab_rec *fstab); +int fs_mgr_is_encryptable(struct fstab_rec *fstab); +#ifdef __cplusplus +} +#endif #endif /* __CORE_FS_MGR_H */ |