[pve-devel] [PATCH qemu-server v2 4/4] parse vm config: remove "\s*" from multi-line comment regex

Stefan Sterz s.sterz at proxmox.com
Thu Feb 24 15:49:39 CET 2022


To be consistent with PBS's implementation of multi-line comments
remove "\s*" here too. Since the regex isn't lazy .* matches
everything \s* would anyway. (Note that new lines occurs after "$").

Signed-off-by: Stefan Sterz <s.sterz at proxmox.com>
---

There was a typo in the previous version of this patch, thanks to 
@oguz for spotting it.

 PVE/QemuServer.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 243c2e5..2347183 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -2366,7 +2366,7 @@ sub parse_vm_config {
 	    next;
 	}
 
-	if ($line =~ m/^\#(.*)\s*$/) {
+	if ($line =~ m/^\#(.*)$/) {
 	    $descr = '' if !defined($descr);
 	    $descr .= PVE::Tools::decode_text($1) . "\n";
 	    next;
-- 
2.30.2






More information about the pve-devel mailing list