[pve-devel] [PATCH 2/8] rename vm_deviceadd to vm_deviceplug, and vm_devicedel to vm_deviceunplug
Derumier Alexandre
aderumier at odiso.com
Fri Dec 23 08:09:42 CET 2011
Signed-off-by: Derumier Alexandre <aderumier at odiso.com>
---
PVE/API2/Qemu.pm | 2 +-
PVE/QemuServer.pm | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 15c4ea3..2104cc8 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -533,7 +533,7 @@ __PACKAGE__->register_method({
}
next if !defined($conf->{$opt});
if (PVE::QemuServer::valid_drivename($opt)) {
- PVE::QemuServer::vm_devicedel($vmid, $conf, $opt);
+ PVE::QemuServer::vm_deviceunplug($vmid, $conf, $opt);
my $drive = PVE::QemuServer::parse_drive($opt, $conf->{$opt});
if (PVE::QemuServer::drive_is_cdrom($drive)) {
$cdchange->{$opt} = undef;
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index d1b2d97..48edfe0 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1292,7 +1292,7 @@ sub create_disks {
die "image '$path' does not exists\n";
}
}
- PVE::QemuServer::vm_deviceadd($storecfg, $conf, $vmid, $ds, $disk) if defined($conf);
+ PVE::QemuServer::vm_deviceplug($storecfg, $conf, $vmid, $ds, $disk) if defined($conf);
});
};
@@ -2278,7 +2278,7 @@ sub vm_devices_list {
return $devices;
}
-sub vm_deviceadd {
+sub vm_deviceplug {
my ($storecfg, $conf, $vmid, $deviceid, $device) = @_;
return if !check_running($vmid) || !$conf->{hotplug} || $conf->{$deviceid};
@@ -2307,7 +2307,7 @@ sub vm_deviceadd {
die "error on hotplug device $deviceid";
}
-sub vm_devicedel {
+sub vm_deviceunplug {
my ($vmid, $conf, $deviceid) = @_;
return if !check_running ($vmid) || !$conf->{hotplug};
--
1.7.2.5
More information about the pve-devel
mailing list