fs_mgr: fix the fs_mgr_setup_verity param name
The 'verify_dev' parameter for fs_mgr_setup_verity is confusing, since it doesn't necessarily control the "verification" part of the function. Instead, it merely allows the caller to skip the wait_for_dm_verity_device part of the function. So, rename that parameter for what it is. b/27805372 Test: Boot sailfish Change-Id: I024e02fd728f5cd5bb333d9c3b512861731fa215 Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
parent
971a460c5b
commit
d2462570b8
|
@ -661,6 +661,8 @@ static int handle_encryptable(const struct fstab_rec* rec)
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: add ueventd notifiers if they don't exist.
|
||||
// This is just doing a wait_for_device for maximum of 1s
|
||||
int fs_mgr_test_access(const char *device) {
|
||||
int tries = 25;
|
||||
while (tries--) {
|
||||
|
|
|
@ -859,7 +859,10 @@ static void update_verity_table_blk_device(char *blk_device, char **table)
|
|||
*table = strdup(result.c_str());
|
||||
}
|
||||
|
||||
int fs_mgr_setup_verity(struct fstab_rec *fstab, bool verify_dev)
|
||||
// prepares the verity enabled (MF_VERIFY / MF_VERIFYATBOOT) fstab record for
|
||||
// mount. The 'wait_for_verity_dev' parameter makes this function wait for the
|
||||
// verity device to get created before return
|
||||
int fs_mgr_setup_verity(struct fstab_rec *fstab, bool wait_for_verity_dev)
|
||||
{
|
||||
int retval = FS_MGR_SETUP_VERITY_FAIL;
|
||||
int fd = -1;
|
||||
|
@ -1026,7 +1029,7 @@ loaded:
|
|||
}
|
||||
|
||||
// make sure we've set everything up properly
|
||||
if (verify_dev && fs_mgr_test_access(fstab->blk_device) < 0) {
|
||||
if (wait_for_verity_dev && fs_mgr_test_access(fstab->blk_device) < 0) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue