[pve-devel] [RFC PATCH qemu-server 2/7] memory: simplify qemu_dimm_list

Wolfgang Bumiller w.bumiller at proxmox.com
Tue Dec 20 12:49:21 CET 2016


---
 PVE/QemuServer/Memory.pm | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/PVE/QemuServer/Memory.pm b/PVE/QemuServer/Memory.pm
index 67276d9..e2086cc 100644
--- a/PVE/QemuServer/Memory.pm
+++ b/PVE/QemuServer/Memory.pm
@@ -203,12 +203,8 @@ sub qemu_dimm_list {
     my $dimms = {};
 
     foreach my $dimm (@$dimmarray) {
-
-        $dimms->{$dimm->{data}->{id}}->{id} = $dimm->{data}->{id};
-        $dimms->{$dimm->{data}->{id}}->{node} = $dimm->{data}->{node};
-        $dimms->{$dimm->{data}->{id}}->{addr} = $dimm->{data}->{addr};
-        $dimms->{$dimm->{data}->{id}}->{size} = $dimm->{data}->{size};
-        $dimms->{$dimm->{data}->{id}}->{slot} = $dimm->{data}->{slot};
+	my $data = $dimm->{data};
+	$dimms->{$data->{id}} = $data;
     }
     return $dimms;
 }
-- 
2.1.4





More information about the pve-devel mailing list