ksud: report module mounted event to kernel

This commit is contained in:
weishu
2024-01-08 12:11:54 +08:00
parent 506385cfad
commit 757e69b15e
2 changed files with 8 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ pub const CMD_CHECK_SAFEMODE: u64 = 9;
const EVENT_POST_FS_DATA: u64 = 1;
const EVENT_BOOT_COMPLETED: u64 = 2;
const EVENT_MODULE_MOUNTED: u64 = 3;
#[cfg(any(target_os = "linux", target_os = "android"))]
pub fn grant_root() -> Result<()> {
@@ -339,3 +340,7 @@ pub fn report_post_fs_data() {
pub fn report_boot_complete() {
report_event(EVENT_BOOT_COMPLETED);
}
pub fn report_module_mounted() {
report_event(EVENT_MODULE_MOUNTED);
}