(sandbox_id: &str)
| 124 | } |
| 125 | |
| 126 | fn cleanup_sandbox_token_file(sandbox_id: &str) { |
| 127 | let Ok(path) = sandbox_token_host_path(sandbox_id) else { |
| 128 | return; |
| 129 | }; |
| 130 | if let Err(err) = std::fs::remove_file(&path) |
| 131 | && err.kind() != std::io::ErrorKind::NotFound |
| 132 | { |
| 133 | warn!( |
| 134 | sandbox_id = %sandbox_id, |
| 135 | path = %path.display(), |
| 136 | error = %err, |
| 137 | "Failed to remove Podman sandbox token file" |
| 138 | ); |
| 139 | } |
| 140 | if let Some(dir) = path.parent() { |
| 141 | let _ = std::fs::remove_dir(dir); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | fn local_podman_cdi_gpu_inventory_from(dev_root: &Path) -> CdiGpuInventory { |
| 146 | let mut device_ids = std::fs::read_dir(dev_root) |
no test coverage detected