[pve-devel] [PATCH container 3/4] vmstatus: make boolean value explicit

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Mar 3 17:53:54 CET 2021


On 03.03.21 12:01, Fabian Ebner wrote:
> as otherwise the empty string is printed with 'pct status <id> --verbose' when
> it's not a template.
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  src/PVE/LXC.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
> index bae236b..23a7b06 100644
> --- a/src/PVE/LXC.pm
> +++ b/src/PVE/LXC.pm
> @@ -235,7 +235,7 @@ sub vmstatus {
>  	$d->{diskread} = 0;
>  	$d->{diskwrite} = 0;
>  
> -	$d->{template} = PVE::LXC::Config->is_template($conf);
> +	$d->{template} = PVE::LXC::Config->is_template($conf) ? 1 : 0;

same comment here, but again can be just fine they way you changed it.

>  	$d->{lock} = $conf->{lock} if $conf->{lock};
>      }
>  
> 






More information about the pve-devel mailing list