[pve-devel] [PATCH storage 6/9] default format helper: only return default format
Fiona Ebner
f.ebner at proxmox.com
Mon Jul 21 14:10:51 CEST 2025
Callers that required the valid formats are now using the
resolve_format_hint() helper instead.
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
Versioned breaks for qemu-server needed!
src/PVE/Storage.pm | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index 24ca19f..e2e6742 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -1675,10 +1675,7 @@ sub storage_default_format {
my $scfg = storage_config($cfg, $storeid);
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
- my $formats = $plugin->get_formats($scfg, $storeid);
-
- return
- wantarray ? ($formats->{default}, [sort keys $formats->{valid}->%*]) : $formats->{default};
+ return $plugin->get_formats($scfg, $storeid)->{default};
}
sub resolve_format_hint {
--
2.47.2
More information about the pve-devel
mailing list