[pve-devel] [RFC pve-storage 24/36] plugin: esxi: remove unused helper subroutine `query_vmdk_size`

Max Carrara m.carrara at proxmox.com
Wed Jul 17 11:40:22 CEST 2024


This subroutine does not appear to be used in any of our Perl code, so
remove it.

Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
 src/PVE/Storage/ESXiPlugin.pm | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm
index d4b6afc..2bab7f8 100644
--- a/src/PVE/Storage/ESXiPlugin.pm
+++ b/src/PVE/Storage/ESXiPlugin.pm
@@ -299,24 +299,6 @@ sub get_import_metadata : prototype($$$$$) {
     return $vmx->get_create_args();
 }
 
-# Returns a size in bytes, this is a helper for already-mounted files.
-sub query_vmdk_size : prototype($;$) {
-    my ($filename, $timeout) = @_;
-
-    my $json = eval {
-	my $json = '';
-	run_command(['/usr/bin/qemu-img', 'info', '--output=json', $filename],
-	    timeout => $timeout,
-	    outfunc => sub { $json .= $_[0]; },
-	    errfunc => sub { warn "$_[0]\n"; }
-	);
-	from_json($json)
-    };
-    warn $@ if $@;
-
-    return int($json->{'virtual-size'});
-}
-
 #
 # Storage API implementation
 #
-- 
2.39.2





More information about the pve-devel mailing list