[pve-devel] [PATCH storage 2/3] esxi: fix return value of volume_size_info for vmx volumes
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Dec 10 12:19:29 CET 2024
in case of an array context, it should also return the format, else a caller
might assume it failed.
Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
src/PVE/Storage/ESXiPlugin.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index 37f9e75..609f3f9 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -535,7 +535,9 @@ sub volume_resize {
sub volume_size_info {
my ($class, $scfg, $storeid, $volname, $timeout) = @_;
- return 0 if $volname =~ /\.vmx$/;
+ if ($volname =~ /\.vmx$/) {
+ return wantarray ? ('vmx', 0) : 0 ;
+ }
my $filename = $class->path($scfg, $volname, $storeid, undef);
return PVE::Storage::Plugin::file_size_info($filename, $timeout, 'auto-detect');
--
2.39.5
More information about the pve-devel
mailing list