[pve-devel] [PATCH 3/6] qemu_netdevdel : convert to qmp

Alexandre Derumier aderumier at odiso.com
Tue Feb 19 10:22:08 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 4bdca11..1bfc020 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2737,12 +2737,8 @@ sub qemu_netdevadd {
 sub qemu_netdevdel {
     my ($vmid, $deviceid) = @_;
 
-    my $ret = vm_human_monitor_command($vmid, "netdev_del $deviceid");
-    $ret =~ s/^\s+//;
-    #if the command succeeds, no output is sent. So any non-empty string shows an error
-    return 1 if $ret eq "";
-    syslog("err", "deleting netdev failed: $ret");
-    return undef;
+    vm_mon_cmd($vmid, "netdev_del", id => $deviceid);
+    return 1;
 }
 
 sub qemu_block_set_io_throttle {
-- 
1.7.10.4




More information about the pve-devel mailing list