[pve-devel] [PATCH qemu-server] parse_vm_config: allow spaces in values
Wolfgang Bumiller
w.bumiller at proxmox.com
Wed Mar 9 14:51:30 CET 2016
Serial numbers can have spaces (and qemu space-pads them,
but on the right side and sometimes they need to be
left-padded).
parse_property_string() can work it, so it's already
possible to add them, but they'll be stuck in the [pending]
section and never applied.
---
PVE/QemuServer.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index c0907bc..d13ad54 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2002,7 +2002,7 @@ sub parse_vm_config {
} else {
warn "vm $vmid - propertry 'delete' is only allowed in [PENDING]\n";
}
- } elsif ($line =~ m/^([a-z][a-z_]*\d*):\s*(\S+)\s*$/) {
+ } elsif ($line =~ m/^([a-z][a-z_]*\d*):\s*(.+?)\s*$/) {
my $key = $1;
my $value = $2;
eval { $value = check_type($key, $value); };
--
2.1.4
More information about the pve-devel
mailing list