[pve-devel] r6476 - in qemu-server/pve2: . PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Aug 15 10:31:00 CEST 2011


Author: dietmar
Date: 2011-08-15 10:31:00 +0200 (Mon, 15 Aug 2011)
New Revision: 6476

Modified:
   qemu-server/pve2/ChangeLog
   qemu-server/pve2/PVE/QemuServer.pm
Log:
	(parse_vm_config): fix parser for files without newline at eof



Modified: qemu-server/pve2/ChangeLog
===================================================================
--- qemu-server/pve2/ChangeLog	2011-08-15 08:07:45 UTC (rev 6475)
+++ qemu-server/pve2/ChangeLog	2011-08-15 08:31:00 UTC (rev 6476)
@@ -4,6 +4,7 @@
 	-usbdevice, try to assigng fixed port to tablet device
 	(parse_usb_device): impl. new syntax for usb devices (-usb0,
 	-usb1, ...)
+	(parse_vm_config): fix parser for files without newline at eof
 
 2011-08-12  Proxmox Support Team  <support at proxmox.com>
 

Modified: qemu-server/pve2/PVE/QemuServer.pm
===================================================================
--- qemu-server/pve2/PVE/QemuServer.pm	2011-08-15 08:07:45 UTC (rev 6475)
+++ qemu-server/pve2/PVE/QemuServer.pm	2011-08-15 08:31:00 UTC (rev 6476)
@@ -1322,7 +1322,7 @@
 
     my $vmid = $1;
 
-    while ($raw =~ s/^(.*)\n//) {
+    while ($raw && $raw =~ s/^(.*?)(\n|$)//) {
 	my $line = $1;
 	
 	next if $line =~ m/^\#/;




More information about the pve-devel mailing list