The features returned by the 'query-proxmox-support' QMP command are
booleans, so just checking for definedness is not enough in principle.
In practice, a feature is currently always true if defined. Still, fix
the checks, should the need to disable support for a feature ever
arise in the future and to avoid propagating the pattern further.

Signed-off-by: Fiona Ebner <f.eb...@proxmox.com>
---
 PVE/VZDump/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index d03aeb11..c2113514 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -639,7 +639,7 @@ my sub check_and_prepare_fleecing {
 
     my $use_fleecing = $fleecing_opts && $fleecing_opts->{enabled} && 
!$is_template;
 
-    if ($use_fleecing && !defined($qemu_support->{'backup-fleecing'})) {
+    if ($use_fleecing && !$qemu_support->{'backup-fleecing'}) {
        $self->log(
            'warn',
            "running QEMU version does not support backup fleecing - continuing 
without",
@@ -739,7 +739,7 @@ sub archive_pbs {
 
        # pve-qemu supports it since 5.2.0-1 (PVE 6.4), so safe to die since 
PVE 8
        die "master key configured but running QEMU version does not support 
master keys\n"
-           if !defined($qemu_support->{'pbs-masterkey'}) && 
defined($master_keyfile);
+           if !$qemu_support->{'pbs-masterkey'} && defined($master_keyfile);
 
        $attach_tpmstate_drive->($self, $task, $vmid);
 
-- 
2.39.5



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

Reply via email to