From 372b44232ca2fad7bf2f4a4dc436578e6cb42993 Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Tue, 28 Apr 2020 09:42:26 +0200 Subject: [PATCH] Fix for array check --- lx-lvm/pvs.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lx-lvm/pvs.pl b/lx-lvm/pvs.pl index dfc8399..0350068 100644 --- a/lx-lvm/pvs.pl +++ b/lx-lvm/pvs.pl @@ -139,7 +139,7 @@ sub parse_pvols { my ($cdsf, $cdsf_bit) = ("",""); # make cDSF bit - if (defined (@{$cdsf{$dsf}})) { + if (@{$cdsf{$dsf}}) { # display only the first cDSF! (in case of multiples) $cdsf = @{$cdsf{$dsf}}[0]; $cdsf_bit = "(".scalar (@{$cdsf{$dsf}}).")"; @@ -359,3 +359,4 @@ on the amount of devices present on the system. @(#) 2019-02-08: fix for comparison operator + remove /dev/ prefix for VG [Patrick Van der Veken] @(#) 2020-03-26: use ceil() to round up to more sensible numbers [Patrick Van der Veken] @(#) 2020-04-25: workaround for bug(?) in ioscan + display error when no dsf is found [Patrick Van der Veken] + @(#) 2020-04-28: fix for array check [Patrick Van der Veken]