mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
automatically accept clearing the log tree on btrfs repair (#2580)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
use std::io::Cursor;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
use tokio::process::Command;
|
use tokio::process::Command;
|
||||||
@@ -23,8 +24,8 @@ pub async fn btrfs_check_repair(logicalname: impl AsRef<Path>) -> Result<Require
|
|||||||
Command::new("btrfs")
|
Command::new("btrfs")
|
||||||
.arg("check")
|
.arg("check")
|
||||||
.arg("--repair")
|
.arg("--repair")
|
||||||
.arg("--force")
|
|
||||||
.arg(logicalname.as_ref())
|
.arg(logicalname.as_ref())
|
||||||
|
.input(Some(&mut Cursor::new(b"y\n")))
|
||||||
.invoke(crate::ErrorKind::DiskManagement)
|
.invoke(crate::ErrorKind::DiskManagement)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user