default format helper: only return default format
Callers that required the valid formats are now using the resolve_format_hint() helper instead. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
c86d8f6d80
commit
cfe7d7ebe7
@ -1675,10 +1675,7 @@ sub storage_default_format {
|
|||||||
my $scfg = storage_config($cfg, $storeid);
|
my $scfg = storage_config($cfg, $storeid);
|
||||||
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
|
||||||
|
|
||||||
my $formats = $plugin->get_formats($scfg, $storeid);
|
return $plugin->get_formats($scfg, $storeid)->{default};
|
||||||
|
|
||||||
return
|
|
||||||
wantarray ? ($formats->{default}, [sort keys $formats->{valid}->%*]) : $formats->{default};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub resolve_format_hint {
|
sub resolve_format_hint {
|
||||||
|
|||||||
Reference in New Issue
Block a user