[pve-devel] [PATCH 5/6] hotplug/unplug devices by default

Dietmar Maurer dietmar at proxmox.com
Tue Feb 19 10:34:21 CET 2013


This patch does not look correct. Should be:

   return 1 if defined($conf->{hotplug}) && $conf->{hotplug} == 0;

?

> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre Derumier
> Sent: Dienstag, 19. Februar 2013 10:22
> To: pve-devel at pve.proxmox.com
> Subject: [pve-devel] [PATCH 5/6] hotplug/unplug devices by default
> 
> 
> Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
> ---
>  PVE/QemuServer.pm |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index
> 434afe3..669f2e5 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -2519,7 +2519,7 @@ sub vm_deviceplug {
>  	return 1;
>      }
> 
> -    return 1 if !$conf->{hotplug};
> +    return 1 if $conf->{hotplug} && $conf->{hotplug} == 0;
> 
>      my $devices_list = vm_devices_list($vmid);
>      return 1 if defined($devices_list->{$deviceid});
> @@ -2586,7 +2586,7 @@ sub vm_deviceunplug {
>  	return 1;
>      }
> 
> -    return 1 if!$conf->{hotplug};
> +    return 1 if $conf->{hotplug} && $conf->{hotplug} == 0;
> 
>      my $devices_list = vm_devices_list($vmid);
>      return 1 if !defined($devices_list->{$deviceid});
> --
> 1.7.10.4
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list