]> git.proxmox.com Git - pve-storage.git/commit - PVE/Storage/Plugin.pm
change file_size_info sub to use qemu-img info json decoding
authorTim Marx <t.marx@proxmox.com>
Fri, 20 Sep 2019 09:12:46 +0000 (11:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 20 Sep 2019 11:01:00 +0000 (13:01 +0200)
commitaf0335e82fbe9e91e8ebeafe8ba1d255a3d30657
tree45e77d471400b361fc484a5d3f74aeee21c71503
parentcfdffd8a20a1bc21b2059c1be59188340ecba603
change file_size_info sub to use qemu-img info json decoding

Using the json output, as suggested by Thomas, we now die if the decoding
fails and, if not, all return values are set to the corresponding decoded
values. That should prevent any unforeseen null size values, except if
qemu-img info reports it, which we then consider as valid.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
PVE/Storage/Plugin.pm