machine: drop unused parameter from assert_valid_machine_property() helper

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2025-01-17 15:24:15 +01:00 committed by Thomas Lamprecht
parent 3aa377c9fe
commit 1cb9f2cb89
3 changed files with 4 additions and 4 deletions

View File

@ -1250,7 +1250,7 @@ __PACKAGE__->register_method({
$conf->{machine} = PVE::QemuServer::Machine::print_machine($machine_conf);
}
}
PVE::QemuServer::Machine::assert_valid_machine_property($conf, $machine_conf);
PVE::QemuServer::Machine::assert_valid_machine_property($machine_conf);
$conf->{lock} = 'import' if $live_import_mapping;
@ -2113,7 +2113,7 @@ my $update_vm_api = sub {
$conf->{pending}->{$opt} = $param->{$opt};
} elsif ($opt eq 'machine') {
my $machine_conf = PVE::QemuServer::Machine::parse_machine($param->{$opt});
PVE::QemuServer::Machine::assert_valid_machine_property($conf, $machine_conf);
PVE::QemuServer::Machine::assert_valid_machine_property($machine_conf);
$conf->{pending}->{$opt} = $param->{$opt};
} elsif ($opt eq 'cipassword') {
if (!PVE::QemuServer::Helpers::windows_version($conf->{ostype})) {

View File

@ -4193,7 +4193,7 @@ sub config_to_command {
$machine_type_min .= "+pve$required_pve_version";
push @$machineFlags, "type=${machine_type_min}";
PVE::QemuServer::Machine::assert_valid_machine_property($conf, $machine_conf);
PVE::QemuServer::Machine::assert_valid_machine_property($machine_conf);
if (my $viommu = $machine_conf->{viommu}) {
if ($viommu eq 'intel') {

View File

@ -56,7 +56,7 @@ sub print_machine {
}
sub assert_valid_machine_property {
my ($conf, $machine_conf) = @_;
my ($machine_conf) = @_;
my $q35 = $machine_conf->{type} && ($machine_conf->{type} =~ m/q35/) ? 1 : 0;
if ($machine_conf->{viommu} && $machine_conf->{viommu} eq "intel" && !$q35) {
die "to use Intel vIOMMU please set the machine type to q35\n";