allow for multiple disk repairs (#1375)

* allow for multiple disk repairs

* actually reboot if reboot required

* must_use
This commit is contained in:
Aiden McClelland
2022-04-01 11:39:03 -06:00
committed by GitHub
parent 3b930060a8
commit 6ac87a51e4
3 changed files with 43 additions and 17 deletions

View File

@@ -202,7 +202,7 @@ pub async fn import<P: AsRef<Path>>(
datadir: P,
repair: RepairStrategy,
password: &str,
) -> Result<(), Error> {
) -> Result<RequiresReboot, Error> {
let scan = pvscan().await?;
if scan
.values()
@@ -250,8 +250,7 @@ pub async fn import<P: AsRef<Path>>(
.arg(guid)
.invoke(crate::ErrorKind::DiskManagement)
.await?;
mount_all_fs(guid, datadir, repair, password).await?;
Ok(())
mount_all_fs(guid, datadir, repair, password).await
}
#[instrument(skip(datadir, password))]