[pve-devel] [PATCH qemu-server 1/4] vmstatus: make boolean value explicit

Fabian Ebner f.ebner at proxmox.com
Wed Mar 3 12:01:25 CET 2021


as otherwise the empty string is printed with 'qm status <id> --verbose' when
it's not a template.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index a498444..43d7c6b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2621,7 +2621,7 @@ sub vmstatus {
 	$d->{diskread} = 0;
 	$d->{diskwrite} = 0;
 
-        $d->{template} = PVE::QemuConfig->is_template($conf);
+        $d->{template} = PVE::QemuConfig->is_template($conf) ? 1 : 0;
 
 	$d->{serial} = 1 if conf_has_serial($conf);
 	$d->{lock} = $conf->{lock} if $conf->{lock};
-- 
2.20.1






More information about the pve-devel mailing list