file size info: prepare to make format parameter mandatory
In almost all cases, there already is an expected format. Allow setting a special value 'auto-detect' to opt-in to automatic format detection by 'qemu-img' for the exceptions. Suggested-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Fabian Grünbichler
parent
9612844ff3
commit
936fbe3f35
@ -354,7 +354,7 @@ ovf:Item[rasd:InstanceID='%s']/rasd:ResourceType", $controller_id);
|
||||
}
|
||||
|
||||
if (!$isOva) {
|
||||
my $size = PVE::Storage::file_size_info($backing_file_path);
|
||||
my $size = PVE::Storage::file_size_info($backing_file_path, undef, 'auto-detect');
|
||||
die "error parsing $backing_file_path, cannot determine file size\n"
|
||||
if !$size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user