set-verity-state: Harden logic of overlayfs setup/teardown
Refactor set_avb_verity_state() to return tri-state result: {.success=false} Failed to set verity state. {.success=true, .want_reboot=false} Success but verity already is requested state, so no need to reboot. {.success=true, .want_reboot=true} Successfully changed verity state, need reboot to take effect. Setup overlayfs only if verity is going to be or already disabled. Teardown overlayfs regardless of enable-verity success of not. This ensures more robust behavior of setup / teardown overlayfs. Adjust the log messages for consistent wording. No point logging the errno of fs_mgr_overlayfs_[setup|teardown] because the error must already be logged by callee. Bug: 241688845 Test: adb [disable|enable]-verity Change-Id: I3a77fe567757ca6173e8c3142e77fef483d9b849
Loading
Please register or sign in to comment