ksud: fix supported kmi

This commit is contained in:
weishu
2024-03-23 13:59:05 +08:00
parent 98030ee1ae
commit c924c655df

View File

@@ -41,7 +41,8 @@ pub fn copy_assets_to_file(name: &str, dst: impl AsRef<Path>) -> Result<()> {
pub fn list_supported_kmi() -> Result<Vec<String>> { pub fn list_supported_kmi() -> Result<Vec<String>> {
let mut list = Vec::new(); let mut list = Vec::new();
for file in Asset::iter() { for file in Asset::iter() {
if let Some(kmi) = file.strip_suffix(".ko") { // kmi_name = "xxx_kernelsu.ko"
if let Some(kmi) = file.strip_suffix("_kernelsu.ko") {
list.push(kmi.to_string()); list.push(kmi.to_string());
} }
} }