cfg2cmd: ovmf drive: use volume format from storage layer

Avoid using the extension based qemu_img_format() helper.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2024-12-06 17:25:40 +01:00 committed by Fabian Grünbichler
parent e4cbea4436
commit d6e76d1b60

View File

@ -3539,10 +3539,7 @@ my sub print_ovmf_drive_commandlines {
my ($path, $format) = $d->@{'file', 'format'};
if ($storeid) {
$path = PVE::Storage::path($storecfg, $d->{file});
if (!defined($format)) {
my $scfg = PVE::Storage::storage_config($storecfg, $storeid);
$format = qemu_img_format($scfg, $volname);
}
$format //= checked_volume_format($storecfg, $d->{file});
} elsif (!defined($format)) {
die "efidisk format must be specified\n";
}