[pve-devel] r5961 - qemu-server/pve2/PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Wed May 11 11:36:18 CEST 2011


Author: dietmar
Date: 2011-05-11 11:36:18 +0200 (Wed, 11 May 2011)
New Revision: 5961

Modified:
   qemu-server/pve2/PVE/QemuServer.pm
Log:
avoid undefined values


Modified: qemu-server/pve2/PVE/QemuServer.pm
===================================================================
--- qemu-server/pve2/PVE/QemuServer.pm	2011-05-10 11:39:21 UTC (rev 5960)
+++ qemu-server/pve2/PVE/QemuServer.pm	2011-05-11 09:36:18 UTC (rev 5961)
@@ -1654,7 +1654,8 @@
 	# fixme: better status?
 	$d->{status} = $list->{$vmid}->{pid} ? 'running' : 'stopped';
 
-	if (my ($size, $used) = disksize($storecfg, $conf)) {
+	my ($size, $used) = disksize($storecfg, $conf);
+	if (defined($size) && defined($used)) {
 	    $d->{disk} = $used;
 	    $d->{maxdisk} = $size;
 	} else {




More information about the pve-devel mailing list