this helper was defined twice, once as 'my $is_volume_in_use' sub and second as a helper sub. as our other helpers with a similar structure, it is better to prepend the variable sub with two underscores.
Signed-off-by: Oguz Bektas <o.bek...@proxmox.com> --- src/PVE/LXC/Config.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm index 729cc08..da5ef03 100644 --- a/src/PVE/LXC/Config.pm +++ b/src/PVE/LXC/Config.pm @@ -1300,7 +1300,7 @@ sub classify_mountpoint { return 'volume'; } -my $is_volume_in_use = sub { +my $__is_volume_in_use = sub { my ($class, $config, $volid) = @_; my $used = 0; @@ -1318,16 +1318,16 @@ sub is_volume_in_use_by_snapshots { if (my $snapshots = $config->{snapshots}) { foreach my $snap (keys %$snapshots) { - return 1 if $is_volume_in_use->($class, $snapshots->{$snap}, $volid); + return 1 if $__is_volume_in_use->($class, $snapshots->{$snap}, $volid); } } return 0; -}; +} sub is_volume_in_use { my ($class, $config, $volid, $include_snapshots) = @_; - return 1 if $is_volume_in_use->($class, $config, $volid); + return 1 if $__is_volume_in_use->($class, $config, $volid); return 1 if $include_snapshots && $class->is_volume_in_use_by_snapshots($config, $volid); return 0; } -- 2.20.1 _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel