public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Stefan Sterz <s.sterz@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container 3/4] parse pct config: remove "\s*" from multi-line comment regex
Date: Thu, 24 Feb 2022 15:21:50 +0100	[thread overview]
Message-ID: <20220224142151.3206908-3-s.sterz@proxmox.com> (raw)
In-Reply-To: <20220224142151.3206908-1-s.sterz@proxmox.com>

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@proxmox.com>
---
 src/PVE/LXC/Config.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/LXC/Config.pm b/src/PVE/LXC/Config.pm
index 0ed7bd2..548f07c 100644
--- a/src/PVE/LXC/Config.pm
+++ b/src/PVE/LXC/Config.pm
@@ -943,7 +943,7 @@ sub parse_pct_config {
 	    next;
 	}
 
-	if ($line =~ m/^\#(.*)\s*$/) {
+	if ($line =~ m/^\#(.*)$/) {
 	    $descr .= PVE::Tools::decode_text($1) . "\n";
 	    next;
 	}
-- 
2.30.2





  parent reply	other threads:[~2022-02-24 14:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-24 14:21 [pve-devel] [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Stefan Sterz
2022-02-24 14:21 ` [pve-devel] [PATCH manager 2/4] parse node " Stefan Sterz
2022-02-24 14:21 ` Stefan Sterz [this message]
2022-02-24 14:21 ` [pve-devel] [PATCH qemu-server 4/4] parse vm config: remove "\s*" from multi-line " Stefan Sterz
2022-04-27  9:21   ` Thomas Lamprecht
2022-04-27  6:56 ` [pve-devel] applied-series: [PATCH cluster 1/4] parse datacenter config: remove "\s*" from " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220224142151.3206908-3-s.sterz@proxmox.com \
    --to=s.sterz@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal