From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id C99D3908F for ; Tue, 1 Aug 2023 16:46:43 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9763DF4E0 for ; Tue, 1 Aug 2023 16:46:13 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 1 Aug 2023 16:46:11 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6AC53409AF for ; Tue, 1 Aug 2023 16:46:11 +0200 (CEST) From: Philipp Hufnagl To: pve-devel@lists.proxmox.com Date: Tue, 1 Aug 2023 16:46:02 +0200 Message-Id: <20230801144604.760331-5-p.hufnagl@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230801144604.760331-1-p.hufnagl@proxmox.com> References: <20230801144604.760331-1-p.hufnagl@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.002 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH common v4 2/2] fix whitespaces X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2023 14:46:43 -0000 Signed-off-by: Philipp Hufnagl --- src/PVE/Tools.pm | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 159ec82..28e70f0 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -92,23 +92,23 @@ our $EMAIL_USER_RE = qr/[\w\+\-\~]+(\.[\w\+\-\~]+)*/; our $EMAIL_RE = qr/$EMAIL_USER_RE@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*/; use constant {CLONE_NEWNS => 0x00020000, - CLONE_NEWUTS => 0x04000000, - CLONE_NEWIPC => 0x08000000, - CLONE_NEWUSER => 0x10000000, - CLONE_NEWPID => 0x20000000, - CLONE_NEWNET => 0x40000000}; + CLONE_NEWUTS => 0x04000000, + CLONE_NEWIPC => 0x08000000, + CLONE_NEWUSER => 0x10000000, + CLONE_NEWPID => 0x20000000, + CLONE_NEWNET => 0x40000000}; use constant {O_PATH => 0x00200000, - O_CLOEXEC => 0x00080000, - O_TMPFILE => 0x00400000 | O_DIRECTORY}; + O_CLOEXEC => 0x00080000, + O_TMPFILE => 0x00400000 | O_DIRECTORY}; use constant {AT_EMPTY_PATH => 0x1000, - AT_FDCWD => -100}; + AT_FDCWD => -100}; # from use constant {RENAME_NOREPLACE => (1 << 0), - RENAME_EXCHANGE => (1 << 1), - RENAME_WHITEOUT => (1 << 2)}; + RENAME_EXCHANGE => (1 << 1), + RENAME_WHITEOUT => (1 << 2)}; sub run_with_timeout { my ($timeout, $code, @param) = @_; @@ -579,7 +579,7 @@ sub run_command { } } - alarm(0); + alarm(0); }; my $err = $@; @@ -1354,7 +1354,7 @@ sub dump_journal { my $parser = sub { my $line = shift; - return if $count++ < $start; + return if $count++ < $start; return if $limit <= 0; push @$lines, { n => int($count), t => $line}; $limit--; @@ -1441,7 +1441,7 @@ sub unpack_sockaddr_in46 { my ($sin) = @_; my $family = Socket::sockaddr_family($sin); my ($port, $host) = ($family == AF_INET6 ? Socket::unpack_sockaddr_in6($sin) - : Socket::unpack_sockaddr_in($sin)); + : Socket::unpack_sockaddr_in($sin)); return ($family, $port, $host); } @@ -1485,8 +1485,8 @@ sub get_fqdn { sub parse_host_and_port { my ($address) = @_; if ($address =~ /^($IPV4RE|[[:alnum:]\-.]+)(?::(\d+))?$/ || # ipv4 or host with optional ':port' - $address =~ /^\[($IPV6RE|$IPV4RE|[[:alnum:]\-.]+)\](?::(\d+))?$/ || # anything in brackets with optional ':port' - $address =~ /^($IPV6RE)(?:\.(\d+))?$/) # ipv6 with optional port separated by dot + $address =~ /^\[($IPV6RE|$IPV4RE|[[:alnum:]\-.]+)\](?::(\d+))?$/ || # anything in brackets with optional ':port' + $address =~ /^($IPV6RE)(?:\.(\d+))?$/) # ipv6 with optional port separated by dot { return ($1, $2, 1); # end with 1 to support simple if(parse...) tests } -- 2.39.2