mirror of
https://git.proxmox.com/git/qemu-server
synced 2026-01-03 23:41:29 +00:00
correcctly check if option is a drive
This commit is contained in:
parent
5c5cc37228
commit
1f1412d189
@ -2188,7 +2188,9 @@ __PACKAGE__->register_method({
|
||||
my $net = PVE::QemuServer::parse_net($value);
|
||||
$net->{macaddr} = PVE::Tools::random_ether_addr();
|
||||
$newconf->{$opt} = PVE::QemuServer::print_net($net);
|
||||
} elsif (my $drive = PVE::QemuServer::parse_drive($opt, $value)) {
|
||||
} elsif (PVE::QemuServer::valid_drivename($opt)) {
|
||||
my $drive = PVE::QemuServer::parse_drive($opt, $value);
|
||||
die "unable to parse drive options for '$opt'\n" if !$drive;
|
||||
if (PVE::QemuServer::drive_is_cdrom($drive)) {
|
||||
$newconf->{$opt} = $value; # simply copy configuration
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user