[pve-devel] [PATCH V2 storage 3/3] LIO: re-use variables

Daniel Berteaud daniel at firewall-services.com
Thu Sep 26 17:27:02 CEST 2019


Signed-off-by: Daniel Berteaud <daniel at firewall-services.com>
---
 PVE/Storage/LunCmd/LIO.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/Storage/LunCmd/LIO.pm b/PVE/Storage/LunCmd/LIO.pm
index 122c203..15ddabf 100644
--- a/PVE/Storage/LunCmd/LIO.pm
+++ b/PVE/Storage/LunCmd/LIO.pm
@@ -255,7 +255,7 @@ my $list_lun = sub {
     my $name = undef;
 
     my $object = $params[0];
-    my $volname = $extract_volname->($scfg, $params[0]);
+    my $volname = $extract_volname->($scfg, $object);
     my $target = $get_target_settings->($scfg);
 
     foreach my $lun (@{$target->{luns}}) {
@@ -324,7 +324,7 @@ my $delete_lun = sub {
     my $tpg = $scfg->{lio_tpg} || die "Target Portal Group not set, aborting!\n";
 
     my $path = $params[0];
-    my $volname = $extract_volname->($scfg, $params[0]);
+    my $volname = $extract_volname->($scfg, $path);
     my $target = $get_target_settings->($scfg);
 
     foreach my $lun (@{$target->{luns}}) {
-- 
2.21.0





More information about the pve-devel mailing list