summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs_mgr/fs_mgr.cpp3
-rw-r--r--fs_mgr/include/fs_mgr.h8
2 files changed, 7 insertions, 4 deletions
diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp
index 6417a5c04..b3df811e4 100644
--- a/fs_mgr/fs_mgr.cpp
+++ b/fs_mgr/fs_mgr.cpp
@@ -31,6 +31,7 @@
31#include <time.h> 31#include <time.h>
32#include <unistd.h> 32#include <unistd.h>
33 33
34#include <functional>
34#include <memory> 35#include <memory>
35#include <string> 36#include <string>
36#include <thread> 37#include <thread>
@@ -1356,7 +1357,7 @@ bool fs_mgr_load_verity_state(int* mode) {
1356 return true; 1357 return true;
1357} 1358}
1358 1359
1359bool fs_mgr_update_verity_state(fs_mgr_verity_state_callback callback) { 1360bool fs_mgr_update_verity_state(std::function<fs_mgr_verity_state_callback> callback) {
1360 if (!callback) { 1361 if (!callback) {
1361 return false; 1362 return false;
1362 } 1363 }
diff --git a/fs_mgr/include/fs_mgr.h b/fs_mgr/include/fs_mgr.h
index c1b2ed97a..1049fb6cc 100644
--- a/fs_mgr/include/fs_mgr.h
+++ b/fs_mgr/include/fs_mgr.h
@@ -22,6 +22,8 @@
22#include <stdbool.h> 22#include <stdbool.h>
23#include <linux/dm-ioctl.h> 23#include <linux/dm-ioctl.h>
24 24
25#include <functional>
26
25#include <fstab/fstab.h> 27#include <fstab/fstab.h>
26 28
27// Magic number at start of verity metadata 29// Magic number at start of verity metadata
@@ -48,8 +50,8 @@ enum mount_mode {
48}; 50};
49 51
50// Callback function for verity status 52// Callback function for verity status
51typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab, 53typedef void fs_mgr_verity_state_callback(struct fstab_rec* fstab, const char* mount_point,
52 const char *mount_point, int mode, int status); 54 int mode, int status);
53 55
54#define FS_MGR_MNTALL_DEV_IS_METADATA_ENCRYPTED 7 56#define FS_MGR_MNTALL_DEV_IS_METADATA_ENCRYPTED 7
55#define FS_MGR_MNTALL_DEV_NEEDS_METADATA_ENCRYPTION 6 57#define FS_MGR_MNTALL_DEV_NEEDS_METADATA_ENCRYPTION 6
@@ -73,7 +75,7 @@ int fs_mgr_do_tmpfs_mount(const char *n_name);
73struct fstab_rec const* fs_mgr_get_crypt_entry(struct fstab const* fstab); 75struct fstab_rec const* fs_mgr_get_crypt_entry(struct fstab const* fstab);
74void fs_mgr_get_crypt_info(struct fstab* fstab, char* key_loc, char* real_blk_device, size_t size); 76void fs_mgr_get_crypt_info(struct fstab* fstab, char* key_loc, char* real_blk_device, size_t size);
75bool fs_mgr_load_verity_state(int* mode); 77bool fs_mgr_load_verity_state(int* mode);
76bool fs_mgr_update_verity_state(fs_mgr_verity_state_callback callback); 78bool fs_mgr_update_verity_state(std::function<fs_mgr_verity_state_callback> callback);
77int fs_mgr_swapon_all(struct fstab *fstab); 79int fs_mgr_swapon_all(struct fstab *fstab);
78bool fs_mgr_update_logical_partition(struct fstab_rec* rec); 80bool fs_mgr_update_logical_partition(struct fstab_rec* rec);
79 81