[pve-devel] [PATCH qemu-server] validate_cpu_conf: return config

Fabian Ebner f.ebner at proxmox.com
Wed Aug 12 13:40:12 CEST 2020


as parse_property_string expects it to.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Found while working on the migration tests.
They already turn out to be useful :)

 PVE/QemuServer/CPUConfig.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/PVE/QemuServer/CPUConfig.pm b/PVE/QemuServer/CPUConfig.pm
index 4351cfd..66624fb 100644
--- a/PVE/QemuServer/CPUConfig.pm
+++ b/PVE/QemuServer/CPUConfig.pm
@@ -191,6 +191,8 @@ sub validate_cpu_conf {
     # required, but can't be forced in schema since it's encoded in section
     # header for custom models
     die "CPU is missing cputype\n" if !$cpu->{cputype};
+
+    return $cpu;
 }
 PVE::JSONSchema::register_format('pve-vm-cpu-conf', $cpu_fmt, \&validate_vm_cpu_conf);
 sub validate_vm_cpu_conf {
-- 
2.20.1





More information about the pve-devel mailing list