[pve-devel] [PATCH v2 qemu-server 3/6] fix #2275: die on invalid sendkey

Oguz Bektas o.bektas at proxmox.com
Mon Nov 18 15:41:12 CET 2019


From: Dominik Csapak <d.csapak at proxmox.com>

sendkey does not return anything if it is succesful and the error otherwise

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
(cherry picked from commit d30820d6c382a3c0c1979b33f2f5177900735ade)
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 PVE/QemuServer.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 1228a0b..1af6713 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -5797,7 +5797,8 @@ sub vm_sendkey {
 	my $conf = PVE::QemuConfig->load_config($vmid);
 
 	# there is no qmp command, so we use the human monitor command
-	vm_human_monitor_command($vmid, "sendkey $key");
+	my $res = vm_human_monitor_command($vmid, "sendkey $key");
+	die $res if $res ne '';
     });
 }
 
-- 
2.20.1




More information about the pve-devel mailing list