Signed-off-by: Tim Marx <t.m...@proxmox.com>
---
 PVE/Storage/Plugin.pm | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm
index 39622f3..08cb260 100644
--- a/PVE/Storage/Plugin.pm
+++ b/PVE/Storage/Plugin.pm
@@ -738,9 +738,18 @@ sub file_size_info {
        }
     };
 
+    my $error_function = sub {
+       my $line = shift;
+       $size = undef;
+       $used = undef;
+
+       warn $line;
+    };
+
     my $cmd = ['/usr/bin/qemu-img', 'info', $filename];
     eval {
-       run_command($cmd, timeout => $timeout, outfunc => $parse_qemu_img_info 
);
+       run_command($cmd, timeout => $timeout, outfunc => $parse_qemu_img_info,
+       errfunc => $error_function);
     };
     warn $@ if $@;
 
-- 
2.20.1

_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to