[pve-devel] [PATCH qemu-server] api: migrate: fix variable name

Fabian Ebner f.ebner at proxmox.com
Tue Mar 23 10:15:23 CET 2021


Commit abff03211f28018ce193911173afa39ba1a6ff24 switched to iterating over the
values instead of the keys, but didn't update the variable name. Use target_sid,
because target is already in use for the target node.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Qemu.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index ea74c69..e95ab13 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -3684,8 +3684,8 @@ __PACKAGE__->register_method({
 	    $rpcenv->check_vm_perm($authuser, $vmid, undef, ['VM.Config.Disk'])
 		if !defined($storagemap->{identity});
 
-	    foreach my $source (values %{$storagemap->{entries}}) {
-		$check_storage->($source);
+	    foreach my $target_sid (values %{$storagemap->{entries}}) {
+		$check_storage->($target_sid);
 	    }
 
 	    $check_storage->($storagemap->{default})
-- 
2.20.1






More information about the pve-devel mailing list