From 5521b5805b9c481353ae297416d4ae6d8140b641 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 23 May 2012 13:11:20 +0200 Subject: [PATCH] fix return value for path() --- PVE/Storage.pm | 2 +- PVE/Storage/ISCSIPlugin.pm | 2 +- PVE/Storage/LVMPlugin.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 679e2c4..99f09da 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -575,7 +575,7 @@ sub activate_volumes { activate_storage_list($cfg, [keys %$storagehash], $cache); foreach my $volid (@$vollist) { - my ($storeid, $volname) = parse_volume_id ($volid); + my ($storeid, $volname) = parse_volume_id($volid); my $scfg = storage_config($cfg, $storeid); my $plugin = PVE::Storage::Plugin->lookup($scfg->{type}); $plugin->activate_volume($storeid, $scfg, $volname, $exclusive, $cache); diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm index e76ccbf..3113740 100644 --- a/PVE/Storage/ISCSIPlugin.pm +++ b/PVE/Storage/ISCSIPlugin.pm @@ -280,7 +280,7 @@ sub path { my $path = "/dev/disk/by-id/$name"; - return ($path, $vmid, $vtype); + return wantarray ? ($path, $vmid, $vtype) : $path; } sub alloc_image { diff --git a/PVE/Storage/LVMPlugin.pm b/PVE/Storage/LVMPlugin.pm index 7f4e74c..8c0b613 100644 --- a/PVE/Storage/LVMPlugin.pm +++ b/PVE/Storage/LVMPlugin.pm @@ -231,7 +231,7 @@ sub path { my $path = "/dev/$vg/$name"; - return ($path, $vmid, $vtype); + return wantarray ? ($path, $vmid, $vtype) : $path; } sub alloc_image {