(path: &Path)
| 1381 | } |
| 1382 | |
| 1383 | fn path_to_cstring(path: &Path) -> Result<CString, String> { |
| 1384 | let path = path |
| 1385 | .to_str() |
| 1386 | .ok_or_else(|| format!("path is not valid UTF-8: {}", path.display()))?; |
| 1387 | CString::new(path).map_err(|e| format!("invalid path string {path}: {e}")) |
| 1388 | } |
| 1389 | |
| 1390 | #[cfg(target_os = "linux")] |
| 1391 | fn check_kvm_access() -> Result<(), String> { |
no outgoing calls
no test coverage detected