[pve-devel] [PATCH] this commit:

Stefan Priebe - Profihost AG s.priebe at profihost.ag
Mon Dec 22 17:10:19 CET 2014


> Am 22.12.2014 um 16:36 schrieb Dietmar Maurer <dietmar at proxmox.com>:
> 
> 
>>    $timeout = 60 if !defined($timeout);
>> -    my $config = load_config($vmid);
> 
> Oh, we already have $conf loaded - good catch!
> 
>>    eval {
>>        if ($shutdown) {
>> -        if ($config->{agent}) {
>> +        if (!$nocheck && $conf->{agent}) {
>>            vm_qmp_command($vmid, { execute => "guest-shutdown" }, $nocheck);
> 
> we pass $nockeck to  vm_qmp_command, so the following should be good enough:
> 
> -        if ($config->{agent}) {
> +        if ($conf->{agent}) {

But conf may be undefined if we do not load the config. So check for a key might issue a warning.

> 
> 
> Would you mind to cleanup the patch? Or can I simply commit a modified version?
> 



More information about the pve-devel mailing list