[pve-devel] [PATCH 1/6] qemu_devicedel : convert to qmp
Alexandre Derumier
aderumier at odiso.com
Tue Feb 19 10:22:06 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 21368cd..6b0ccfc 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2631,12 +2631,8 @@ sub qemu_deviceadd {
sub qemu_devicedel {
my($vmid, $deviceid) = @_;
-
- my $ret = vm_human_monitor_command($vmid, "device_del $deviceid");
- $ret =~ s/^\s+//;
- return 1 if $ret eq "";
- syslog("err", "detaching device $deviceid failed : $ret");
- return undef;
+ my $ret = vm_mon_cmd($vmid, "device_del", id => $deviceid);
+ return 1;
}
sub qemu_driveadd {
--
1.7.10.4
More information about the pve-devel
mailing list