mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
fix recovery
This commit is contained in:
committed by
Aiden McClelland
parent
c199a6525f
commit
b2fa955ad5
@@ -105,7 +105,9 @@ pub async fn get_label<P: AsRef<Path>>(path: P) -> Result<Option<String>, Error>
|
||||
.arg(path.as_ref())
|
||||
.invoke(crate::ErrorKind::BlockDevice)
|
||||
.await?,
|
||||
)?;
|
||||
)?
|
||||
.trim()
|
||||
.to_owned();
|
||||
Ok(if label.is_empty() { None } else { Some(label) })
|
||||
}
|
||||
|
||||
@@ -160,6 +162,9 @@ pub async fn list() -> Result<Vec<DiskInfo>, Error> {
|
||||
disk_path.display().to_string(),
|
||||
)
|
||||
})?;
|
||||
if &*disk == Path::new("/dev/mmcblk0") {
|
||||
return Ok(disks);
|
||||
}
|
||||
if !disks.contains_key(&disk) {
|
||||
disks.insert(disk.clone(), IndexSet::new());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user