mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-04 11:57:09 +00:00
machine: rename machine_version() function to is_machine_version_at_least()
The old name does not make it clear what exactly the function does. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
55b277d224
commit
c5d4b11f3e
@ -4532,7 +4532,7 @@ sub qemu_cpu_hotplug {
|
||||
|
||||
if ($vcpus < $currentvcpus) {
|
||||
|
||||
if (PVE::QemuServer::Machine::machine_version($machine_type, 2, 7)) {
|
||||
if (PVE::QemuServer::Machine::is_machine_version_at_least($machine_type, 2, 7)) {
|
||||
|
||||
for (my $i = $currentvcpus; $i > $vcpus; $i--) {
|
||||
qemu_devicedel($vmid, "cpu$i");
|
||||
@ -4560,7 +4560,7 @@ sub qemu_cpu_hotplug {
|
||||
die "vcpus in running vm does not match its configuration\n"
|
||||
if scalar(@{$currentrunningvcpus}) != $currentvcpus;
|
||||
|
||||
if (PVE::QemuServer::Machine::machine_version($machine_type, 2, 7)) {
|
||||
if (PVE::QemuServer::Machine::is_machine_version_at_least($machine_type, 2, 7)) {
|
||||
my $arch = PVE::QemuServer::Helpers::get_vm_arch($conf);
|
||||
|
||||
for (my $i = $currentvcpus+1; $i <= $vcpus; $i++) {
|
||||
|
@ -136,7 +136,7 @@ sub extract_version {
|
||||
return;
|
||||
}
|
||||
|
||||
sub machine_version {
|
||||
sub is_machine_version_at_least {
|
||||
my ($machine_type, $major, $minor, $pve) = @_;
|
||||
|
||||
return PVE::QemuServer::Helpers::min_version(
|
||||
|
Loading…
Reference in New Issue
Block a user