MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / path_to_cstring

Function path_to_cstring

crates/openshell-driver-vm/src/runtime.rs:1383–1388  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1381}
1382
1383fn 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")]
1391fn check_kvm_access() -> Result<(), String> {

Callers 4

set_disksMethod · 0.85
add_net_unixgramMethod · 0.85
add_net_unixstreamMethod · 0.85
set_console_outputMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected