From 0f4533476d7e3c951278afe388cdff3a4655922a Mon Sep 17 00:00:00 2001 From: Fabian Ebner Date: Tue, 28 Sep 2021 13:39:47 +0200 Subject: [PATCH] diskmanage: allow partitions for get_udev_info 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 --- PVE/Diskmanage.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index 10e1218..e4f3d05 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -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