ksud: dummy mount stdout and stderr
This commit is contained in:
@@ -8,7 +8,10 @@ use retry::delay::NoDelay;
|
||||
use subprocess::Exec;
|
||||
|
||||
fn do_mount_image(src: &str, target: &str) -> Result<()> {
|
||||
let result = Exec::shell(format!("mount -t ext4 {} {}", src, target)).join()?;
|
||||
let result = Exec::shell(format!("mount -t ext4 {} {}", src, target))
|
||||
.stdout(subprocess::NullFile)
|
||||
.stderr(subprocess::Redirection::Merge)
|
||||
.join()?;
|
||||
ensure!(result.success(), "do mount: {} -> {} failed.", src, target);
|
||||
Ok(())
|
||||
}
|
||||
@@ -57,4 +60,4 @@ pub fn get_zip_uncompressed_size(zip_path: &str) -> Result<u64> {
|
||||
.map(|i| zip.by_index(i).unwrap().size())
|
||||
.sum();
|
||||
Ok(total)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user