feat(otg): 增加 libcomposite 自动加载兜底

This commit is contained in:
mofeng-git
2026-03-28 17:06:41 +08:00
parent 1c5288d783
commit abc6bd1677
2 changed files with 41 additions and 0 deletions

View File

@@ -397,6 +397,10 @@ impl OtgService {
return Ok(());
}
if let Err(e) = super::configfs::ensure_libcomposite_loaded() {
warn!("Failed to ensure libcomposite is available: {}", e);
}
// Check if OTG is available
if !Self::is_available() {
let error = "OTG not available: ConfigFS not mounted or no UDC found".to_string();