diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2015-03-19 10:00:34 +0000 |
---|---|---|
committer | Sami Tolvanen <samitolvanen@google.com> | 2015-03-19 10:11:17 +0000 |
commit | acbf9bef43bc650ed84ba891183ebdf689dafb64 (patch) | |
tree | c09a6fee40c660e73d11090b8d79573047ca162a /fs_mgr/include | |
parent | b054582b90de67a5839345b3a39ad683329f1453 (diff) | |
download | system_core-acbf9bef43bc650ed84ba891183ebdf689dafb64.zip system_core-acbf9bef43bc650ed84ba891183ebdf689dafb64.tar.gz system_core-acbf9bef43bc650ed84ba891183ebdf689dafb64.tar.bz2 |
Add init command to set verified properties
Add a command that updates dm-verity state and sets partition.%.verified
properties used by adb remount.
This is needed in init since fs_mgr cannot set properties:
I6a28cccb1ccce960841af20a4b20c32d424b5524
Change-Id: I0fdf5bc29c56690dcadff9d0eb216d3c68483538
Diffstat (limited to 'fs_mgr/include')
-rw-r--r-- | fs_mgr/include/fs_mgr.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h index 0437d45..d2c8fff 100644 --- a/fs_mgr/include/fs_mgr.h +++ b/fs_mgr/include/fs_mgr.h @@ -27,6 +27,10 @@ // turn verity off in userdebug builds. #define VERITY_METADATA_MAGIC_DISABLE 0x46464f56 // "VOFF" +#ifdef __cplusplus +extern "C" { +#endif + // Verity modes enum verity_mode { VERITY_MODE_EIO = 0, @@ -35,10 +39,6 @@ enum verity_mode { VERITY_MODE_LAST = VERITY_MODE_RESTART }; -#ifdef __cplusplus -extern "C" { -#endif - /* * The entries must be kept in the same order as they were seen in the fstab. * Unless explicitly requested, a lookup on mount point should always @@ -66,6 +66,10 @@ struct fstab_rec { unsigned int zram_size; }; +// Callback function for verity status +typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab, + const char *mount_point, int status); + struct fstab *fs_mgr_read_fstab(const char *fstab_path); void fs_mgr_free_fstab(struct fstab *fstab); @@ -84,7 +88,7 @@ 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_load_verity_state(int *mode); -int fs_mgr_update_verity_state(); +int fs_mgr_update_verity_state(fs_mgr_verity_state_callback callback); int fs_mgr_add_entry(struct fstab *fstab, const char *mount_point, const char *fs_type, const char *blk_device); |