]> git.proxmox.com Git - proxmox-backup.git/commitdiff
get_disks: don't fail on zfs_devices
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 8 Jul 2020 12:59:19 +0000 (14:59 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 9 Jul 2020 11:47:31 +0000 (13:47 +0200)
zfs does not have to be installed, so simply log an error and
continue, users still get an error when clicking directly on
ZFS

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/tools/disks.rs

index a4c3e295e83702cb7ac61a216b224226c6b0ea08..73f83705a7333ec635e13b56251b09b63fa1ed78 100644 (file)
@@ -743,7 +743,10 @@ pub fn get_disks(
 
     let partition_type_map = get_partition_type_info()?;
 
-    let zfs_devices = zfs_devices(&partition_type_map, None)?;
+    let zfs_devices = zfs_devices(&partition_type_map, None).or_else(|err| -> Result<HashSet<u64>, Error> {
+        eprintln!("error getting zfs devices: {}", err);
+        Ok(HashSet::new())
+    })?;
 
     let lvm_devices = get_lvm_devices(&partition_type_map)?;