You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
ksud: added module mount command to check current mount system enabled
This commit is contained in:
@@ -61,6 +61,7 @@ fn exec_install_script(module_file: &str) -> Result<()> {
|
||||
.env("KSU_VER_CODE", defs::VERSION_CODE)
|
||||
.env("OUTFD", "1")
|
||||
.env("ZIPFILE", realpath)
|
||||
.env("KSU_OVERLAYFS", "true")
|
||||
.status()?;
|
||||
ensure!(result.success(), "Failed to install module script");
|
||||
Ok(())
|
||||
@@ -185,6 +186,7 @@ fn exec_script<T: AsRef<Path>>(path: T, wait: bool) -> Result<()> {
|
||||
.env("KSU_KERNEL_VER_CODE", ksucalls::get_version().to_string())
|
||||
.env("KSU_VER_CODE", defs::VERSION_CODE)
|
||||
.env("KSU_VER", defs::VERSION_NAME)
|
||||
.env("KSU_OVERLAYFS", "true")
|
||||
.env(
|
||||
"PATH",
|
||||
format!(
|
||||
@@ -789,6 +791,12 @@ fn _list_modules(path: &str) -> Vec<HashMap<String, String>> {
|
||||
modules
|
||||
}
|
||||
|
||||
pub fn mount_system() -> Result<()> {
|
||||
println!("Current mount system: {}", defs::MOUNT_SYSTEM);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn list_modules() -> Result<()> {
|
||||
let modules = _list_modules(defs::MODULE_DIR);
|
||||
println!("{}", serde_json::to_string_pretty(&modules)?);
|
||||
|
||||
Reference in New Issue
Block a user