(image_path: &Path, commands: &[String])
| 656 | } |
| 657 | |
| 658 | fn 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 | |
| 670 | fn run_debugfs_batch_file(image_path: &Path, command_path: &Path) -> Result<(), String> { |
| 671 | let mut last_error = None; |
no test coverage detected