[pve-devel] applied: [PATCH storage] fix #1379: return size as number instead of string

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Jun 2 10:25:44 CEST 2017


applied to master & stable-4

On Tue, May 16, 2017 at 02:53:54PM +0200, Dominik Csapak wrote:
> this caused the webinterface to sort alphabetically instead of numerical
> when sorting by image size
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  PVE/Storage/LVMPlugin.pm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/Storage/LVMPlugin.pm b/PVE/Storage/LVMPlugin.pm
> index 60a58e5..a2b3feb 100644
> --- a/PVE/Storage/LVMPlugin.pm
> +++ b/PVE/Storage/LVMPlugin.pm
> @@ -44,7 +44,7 @@ sub lvm_pv_info {
>  
>  	$pvinfo = {
>  	    pvname => $pvname,
> -	    size => $size,
> +	    size => int($size),
>  	    vgname => $vgname,
>  	    uuid => $uuid,
>  	};
> @@ -136,7 +136,7 @@ sub lvm_list_volumes {
>  	my $lv_type = substr($lv_attr, 0, 1);
>  
>  	my $d = {
> -	    lv_size => $lv_size,
> +	    lv_size => int($lv_size),
>  	    lv_type => $lv_type,
>  	};
>  	$d->{pool_lv} = $pool_lv if $pool_lv;
> -- 
> 2.11.0




More information about the pve-devel mailing list