From b3cecce720ac89cb213eac1e556d63fb33126686 Mon Sep 17 00:00:00 2001 From: Patrick Van der Veken Date: Wed, 13 May 2020 10:59:33 +0200 Subject: [PATCH] Fix for array check, again! --- 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 0350068..52f0bf1 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 (@{$cdsf{$dsf}}) { + if (exists ($cdsf{$dsf})) { # display only the first cDSF! (in case of multiples) $cdsf = @{$cdsf{$dsf}}[0]; $cdsf_bit = "(".scalar (@{$cdsf{$dsf}}).")"; @@ -360,3 +360,4 @@ on the amount of devices present on the system. @(#) 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] + @(#) 2020-05-13: fix on fix for array check [Patrick Van der Veken]