[PATCH pve-storage v1 10/54] plugin: update code style of list_volumes plugin API method

Max R. Carrara
2026-04-22T11:14:59Z

src/PVE/Storage/Plugin.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/PVE/Storage/Plugin.pm b/src/PVE/Storage/Plugin.pm
index c4eb6f18..d2e6e9df 100644
--- a/src/PVE/Storage/Plugin.pm
+++ b/src/PVE/Storage/Plugin.pm
@@ -1787,7 +1787,7 @@ sub list_volumes {

my $res = [];
my $vmlist = PVE::Cluster::get_vmlist();
- foreach my $type (@$content_types) {
+ for my $type ($content_types->@*) {
my $data;

if ($type eq 'images' || $type eq 'rootdir') {
@@ -1808,7 +1808,7 @@ sub list_volumes {

next if !$data;

- foreach my $item (@$data) {
+ for my $item ($data->@*) {
if ($type eq 'images' || $type eq 'rootdir') {
my $vminfo = $vmlist->{ids}->{ $item->{vmid} };
my $vmtype;
@@ -1825,7 +1825,7 @@ sub list_volumes {
$item->{content} = $type;
}

- push @$res, $item;
+ push $res->@*, $item;
}
}

--
2.47.3