[pve-devel] [PATCH qemu-server v2 16/18] machine: rename machine_version() function to machine_version_at_least()
Fiona Ebner
f.ebner at proxmox.com
Thu Jan 16 12:50:52 CET 2025
The old name does not make it clear what exactly the function does.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
PVE/QemuServer.pm | 4 ++--
PVE/QemuServer/Machine.pm | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 6f2a9aed..58d23533 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -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::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::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++) {
diff --git a/PVE/QemuServer/Machine.pm b/PVE/QemuServer/Machine.pm
index 9b18cf6e..6398e756 100644
--- a/PVE/QemuServer/Machine.pm
+++ b/PVE/QemuServer/Machine.pm
@@ -136,7 +136,7 @@ sub extract_version {
return;
}
-sub machine_version {
+sub machine_version_at_least {
my ($machine_type, $major, $minor, $pve) = @_;
return PVE::QemuServer::Helpers::min_version(
--
2.39.5
More information about the pve-devel
mailing list