5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-03-10 12:58:25 +03:00

qemu_netdevadd : convert to qmp

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2013-02-19 10:22:09 +01:00 committed by Dietmar Maurer
parent 89c1e0f438
commit 73aa03b87f

View File

@ -2725,13 +2725,10 @@ sub qemu_netdevadd {
my ($vmid, $conf, $device, $deviceid) = @_; my ($vmid, $conf, $device, $deviceid) = @_;
my $netdev = print_netdev_full($vmid, $conf, $device, $deviceid); my $netdev = print_netdev_full($vmid, $conf, $device, $deviceid);
my $ret = vm_human_monitor_command($vmid, "netdev_add $netdev"); my %options = split(/[=,]/, $netdev);
$ret =~ s/^\s+//;
#if the command succeeds, no output is sent. So any non-empty string shows an error vm_mon_cmd($vmid, "netdev_add", %options);
return 1 if $ret eq ""; return 1;
syslog("err", "adding netdev failed: $ret");
return undef;
} }
sub qemu_netdevdel { sub qemu_netdevdel {