]> git.proxmox.com Git - qemu-server.git/commit
update_vm: check whether opt is set before deleting
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 17 Mar 2017 10:01:32 +0000 (11:01 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 23 Mar 2017 10:41:12 +0000 (11:41 +0100)
commitd2c6bf93ae20156da4e60a31a81ca2b0f95acb0d
tree82ee43ab0607c0259a587d5544cda4a667eda910
parent36ca08b70de2ef36d8e56f82b87fcf68f17e377e
update_vm: check whether opt is set before deleting

otherwise we get lots uninitialized warnings:

update VM 600: -delete unused7
Use of uninitialized value $data in split at /usr/share/perl5/PVE/JSONSchema.pm line 533.
Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/PVE/API2/Qemu.pm line 1012.
Use of uninitialized value $volid in pattern match (m//) at /usr/share/perl5/PVE/QemuServer.pm line 1824.
Use of uninitialized value $volid in pattern match (m//) at /usr/share/perl5/PVE/Storage/Plugin.pm line 201.
Use of uninitialized value $volid in concatenation (.) or string at /usr/share/perl5/PVE/Storage/Plugin.pm line 205.

vs:

update VM 600: -delete unused7
cannot delete 'unused7' - not set in current configuration!

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
PVE/API2/Qemu.pm