[pve-devel] [PATCH qemu-server] do not ignore hotplug parse errors

Dominik Csapak d.csapak at proxmox.com
Mon May 30 10:44:37 CEST 2016


if we got an option which was not valid, we still
wrote it to the config, and subsequently returned
it on every api call

instead, now we die instead of warn and do not accept
invalid options

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 5813242..2da9208 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1232,7 +1232,7 @@ sub parse_hotplug_features {
 	if ($feature =~ m/^(network|disk|cpu|memory|usb)$/) {
 	    $res->{$1} = 1;
 	} else {
-	    warn "ignoring unknown hotplug feature '$feature'\n";
+	    die "invalid hotplug feature '$feature'\n";
 	}
     }
     return $res;
-- 
2.1.4





More information about the pve-devel mailing list