ksud: fix compilation and remove unused imports
Signed-off-by: Faris <rsuntk@yukiprjkt.my.id>
This commit is contained in:
@@ -38,5 +38,4 @@ pub const KSU_BACKUP_DIR: &str = WORKING_DIR;
|
||||
pub const KSU_BACKUP_FILE_PREFIX: &str = "ksu_backup_";
|
||||
pub const BACKUP_FILENAME: &str = "stock_image.sha1";
|
||||
|
||||
pub const NO_TMPFS_PATH: &str = concatcp!(WORKING_DIR, ".notmpfs");
|
||||
pub const NO_MOUNT_PATH: &str = concatcp!(WORKING_DIR, ".nomount");
|
||||
|
||||
@@ -2,17 +2,26 @@
|
||||
use crate::kpm;
|
||||
use crate::{
|
||||
assets, defs,
|
||||
defs::{KSU_MOUNT_SOURCE, NO_MOUNT_PATH, NO_TMPFS_PATH},
|
||||
defs::{NO_MOUNT_PATH},
|
||||
utils::find_tmp_path,
|
||||
ksucalls,
|
||||
module::{handle_updated_modules, prune_modules},
|
||||
restorecon, uid_scanner, utils,
|
||||
};
|
||||
use crate::utils::find_tmp_path;
|
||||
use anyhow::{Context, Result};
|
||||
use log::{info, warn};
|
||||
use rustix::fs::{MountFlags, mount};
|
||||
use std::path::Path;
|
||||
|
||||
#[cfg(target_os = "android")]
|
||||
pub fn mount_modules_systemlessly() -> Result<()> {
|
||||
crate::magic_mount::magic_mount(&find_tmp_path())
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "android"))]
|
||||
pub fn mount_modules_systemlessly() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn on_post_data_fs() -> Result<()> {
|
||||
ksucalls::report_post_fs_data();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user