white space cleanups

This commit is contained in:
Dietmar Maurer 2014-01-14 10:33:36 +01:00
parent 838776ab65
commit 264e519fab

View File

@ -1751,6 +1751,7 @@ sub write_vm_config {
if ($conf->{maxcpus} && $conf->{sockets}) {
delete $conf->{sockets};
}
my $used_volids = {};
my $cleanup_config = sub {
@ -2947,16 +2948,19 @@ sub qemu_cpu_hotplug {
my ($vmid, $conf, $cores) = @_;
die "new cores config is not defined" if !$cores;
die "you can't add more cores than maxcpus" if $conf->{maxcpus} && ($cores > $conf->{maxcpus});
die "you can't add more cores than maxcpus"
if $conf->{maxcpus} && ($cores > $conf->{maxcpus});
return if !check_running($vmid);
my $currentcores = $conf->{cores} if $conf->{cores};
die "current cores is not defined" if !$currentcores;
die "maxcpus is not defined" if !$conf->{maxcpus};
raise_param_exc({ 'cores' => "online cpu unplug is not yet possible" }) if($cores < $currentcores);
raise_param_exc({ 'cores' => "online cpu unplug is not yet possible" })
if($cores < $currentcores);
my $currentrunningcores = vm_mon_cmd($vmid, "query-cpus");
raise_param_exc({ 'cores' => "cores number if running vm is different than configuration" }) if scalar (@{$currentrunningcores}) != $currentcores;
raise_param_exc({ 'cores' => "cores number if running vm is different than configuration" })
if scalar (@{$currentrunningcores}) != $currentcores;
for(my $i = $currentcores; $i < $cores; $i++) {
vm_mon_cmd($vmid, "cpu-add", id => int($i));