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

Stefan Sterz s.sterz at proxmox.com
Thu Feb 24 15:21:51 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>
---
 PVE/QemuServer.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 243c2e5..79900e8 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -1,4 +1,4 @@
-package PVE::QemuServer;
+rpackage PVE::QemuServer;
 
 use strict;
 use warnings;
@@ -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