From 818c3b8d91ad65b004042699277aa2f6543527ca Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 15 Apr 2020 18:30:53 +0200 Subject: [PATCH] cfg2cmd: ovmf: code cleanup Signed-off-by: Thomas Lamprecht --- PVE/QemuServer.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 092d9289..64455082 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -3056,14 +3056,12 @@ sub config_to_command { } } - my ($ovmf_code, $ovmf_vars) = get_ovmf_files($arch); if ($conf->{bios} && $conf->{bios} eq 'ovmf') { - die "uefi base image not found\n" if ! -f $ovmf_code; + my ($ovmf_code, $ovmf_vars) = get_ovmf_files($arch); + die "uefi base image '$ovmf_code' not found\n" if ! -f $ovmf_code; - my $path; - my $format; - if (my $efidisk = $conf->{efidisk0}) { - my $d = parse_drive('efidisk0', $efidisk); + my ($path, $format); + if (my $d = parse_drive('efidisk0', $conf->{efidisk0})) { my ($storeid, $volname) = PVE::Storage::parse_volume_id($d->{file}, 1); $format = $d->{format}; if ($storeid) {