(url: &str)
| 36 | |
| 37 | #[cfg(all(target_arch = "x86_64", feature = "guest_debug"))] |
| 38 | pub fn url_to_file(url: &str) -> std::result::Result<PathBuf, GuestDebuggableError> { |
| 39 | let file: PathBuf = url |
| 40 | .strip_prefix("file://") |
| 41 | .ok_or_else(|| { |
| 42 | GuestDebuggableError::Coredump(anyhow!("Could not extract file from URL: {url}")) |
| 43 | }) |
| 44 | .map(|s| s.into())?; |
| 45 | |
| 46 | Ok(file) |
| 47 | } |
| 48 | |
| 49 | pub fn recv_vm_config(source_url: &str) -> std::result::Result<VmConfig, MigratableError> { |
| 50 | let mut vm_config_path = url_to_path(source_url)?; |