feat: 虚拟媒体支持同时挂载多个镜像

This commit is contained in:
mofeng-git
2026-07-12 11:40:01 +08:00
parent c9ae9dd893
commit 7c9166a8cf
24 changed files with 1513 additions and 1036 deletions

View File

@@ -135,8 +135,8 @@ impl OtgGadgetManager {
Ok(device_path)
}
pub fn add_msd(&mut self) -> Result<MsdFunction> {
let func = MsdFunction::new(self.msd_instance);
pub fn add_msd(&mut self, lun_capacity: u8) -> Result<MsdFunction> {
let func = MsdFunction::new(self.msd_instance, lun_capacity)?;
let func_clone = func.clone();
self.add_function(Box::new(func))?;
self.msd_instance += 1;