From 1475a85c586b95c1f5a24a8188bc642fc3d21ab8 Mon Sep 17 00:00:00 2001 From: tiann Date: Tue, 24 Jan 2023 15:06:50 +0800 Subject: [PATCH] ksud: dummy mount stdout and stderr --- userspace/ksud/src/utils.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/userspace/ksud/src/utils.rs b/userspace/ksud/src/utils.rs index eb153614..54f1efcd 100644 --- a/userspace/ksud/src/utils.rs +++ b/userspace/ksud/src/utils.rs @@ -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 { .map(|i| zip.by_index(i).unwrap().size()) .sum(); Ok(total) -} \ No newline at end of file +}