mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-06-27 18:48:22 +00:00
rename vm_deviceadd to vm_deviceplug, and vm_devicedel to vm_deviceunplug
Signed-off-by: Derumier Alexandre <aderumier@odiso.com>
This commit is contained in:
parent
69b6ae0ce3
commit
ec21aa112d
@ -533,7 +533,7 @@ __PACKAGE__->register_method({
|
|||||||
}
|
}
|
||||||
next if !defined($conf->{$opt});
|
next if !defined($conf->{$opt});
|
||||||
if (PVE::QemuServer::valid_drivename($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});
|
my $drive = PVE::QemuServer::parse_drive($opt, $conf->{$opt});
|
||||||
if (PVE::QemuServer::drive_is_cdrom($drive)) {
|
if (PVE::QemuServer::drive_is_cdrom($drive)) {
|
||||||
$cdchange->{$opt} = undef;
|
$cdchange->{$opt} = undef;
|
||||||
|
@ -1290,7 +1290,7 @@ sub create_disks {
|
|||||||
die "image '$path' does not exists\n";
|
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);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2282,7 +2282,7 @@ sub vm_devices_list {
|
|||||||
return $devices;
|
return $devices;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub vm_deviceadd {
|
sub vm_deviceplug {
|
||||||
my ($storecfg, $conf, $vmid, $deviceid, $device) = @_;
|
my ($storecfg, $conf, $vmid, $deviceid, $device) = @_;
|
||||||
return if !check_running($vmid) || !$conf->{hotplug} || $conf->{$deviceid};
|
return if !check_running($vmid) || !$conf->{hotplug} || $conf->{$deviceid};
|
||||||
|
|
||||||
@ -2311,7 +2311,7 @@ sub vm_deviceadd {
|
|||||||
die "error on hotplug device $deviceid";
|
die "error on hotplug device $deviceid";
|
||||||
}
|
}
|
||||||
|
|
||||||
sub vm_devicedel {
|
sub vm_deviceunplug {
|
||||||
my ($vmid, $conf, $deviceid) = @_;
|
my ($vmid, $conf, $deviceid) = @_;
|
||||||
|
|
||||||
return if !check_running ($vmid) || !$conf->{hotplug};
|
return if !check_running ($vmid) || !$conf->{hotplug};
|
||||||
|
Loading…
Reference in New Issue
Block a user