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

Function run_debugfs_batch

crates/openshell-driver-vm/src/rootfs.rs:658–668  ·  view source on GitHub ↗
(image_path: &Path, commands: &[String])

Source from the content-addressed store, hash-verified

656}
657
658fn run_debugfs_batch(image_path: &Path, commands: &[String]) -> Result<(), String> {
659 let command_path = temporary_injection_path(image_path);
660 let mut contents = commands.join("\n");
661 contents.push('\n');
662 fs::write(&command_path, contents)
663 .map_err(|e| format!("write {}: {e}", command_path.display()))?;
664
665 let result = run_debugfs_batch_file(image_path, &command_path);
666 let _ = fs::remove_file(&command_path);
667 result
668}
669
670fn run_debugfs_batch_file(image_path: &Path, command_path: &Path) -> Result<(), String> {
671 let mut last_error = None;

Calls 3

temporary_injection_pathFunction · 0.85
run_debugfs_batch_fileFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected