]> git.proxmox.com Git - pve-storage.git/commitdiff
diskmanage: allow partitions for get_udev_info
authorFabian Ebner <f.ebner@proxmox.com>
Tue, 28 Sep 2021 11:39:47 +0000 (13:39 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 30 Sep 2021 16:10:56 +0000 (18:10 +0200)
both existing callers only call this with non-partitions currently, so
the change should be backwards compatible.

In preparation to enable ZFS creation on top of partitions (where the
udev info is used to get the stable by-id path of a device).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Diskmanage.pm

index 10e12184298051d670def31b610cacce83992fa8..e4f3d05d68480e9a1b45c78235a8bf6d256f8332 100644 (file)
@@ -327,7 +327,7 @@ sub get_udev_info {
     warn $@ if $@;
     return undef if !$info;
 
-    return undef if $info !~ m/^E: DEVTYPE=disk$/m;
+    return undef if $info !~ m/^E: DEVTYPE=(disk|partition)$/m;
     return undef if $info =~ m/^E: ID_CDROM/m;
 
     # we use this, because some disks are not simply in /dev