From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 5349D1FF179 for ; Wed, 1 Oct 2025 11:38:24 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 43E561B07B; Wed, 1 Oct 2025 11:38:28 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Wed, 1 Oct 2025 11:36:42 +0200 Message-ID: <20251001093750.51078-4-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251001093750.51078-1-f.ebner@proxmox.com> References: <20251001093750.51078-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1759311452372 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.022 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 Subject: [pve-devel] [PATCH common 3/3] upid: fix calls to decode function 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: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" The decode function has a signature and always requires two arguments. Otherwise, there will be errors like: > Too few arguments for subroutine 'PVE::UPID::decode' > (got 1; expected 2) at /usr/share/perl5/PVE/UPID.pm line 60. Fixes: 5600b0b ("create dedicated PVE::UPID module") Fixes: ea99050 ("switch to using split out PVE::UPID") Signed-off-by: Fiona Ebner --- src/PVE/ProcFSTools.pm | 2 +- src/PVE/RESTEnvironment.pm | 4 ++-- src/PVE/UPID.pm | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/ProcFSTools.pm b/src/PVE/ProcFSTools.pm index 51a2e79..a8d66d7 100644 --- a/src/PVE/ProcFSTools.pm +++ b/src/PVE/ProcFSTools.pm @@ -525,7 +525,7 @@ sub read_proc_net_ipv6_route { sub upid_wait { my ($upid, $waitfunc, $sleep_intervall) = @_; - my $task = PVE::UPID::decode($upid); + my $task = PVE::UPID::decode($upid, 0); $sleep_intervall = $sleep_intervall ? $sleep_intervall : 1; diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm index 7695850..197cc22 100644 --- a/src/PVE/RESTEnvironment.pm +++ b/src/PVE/RESTEnvironment.pm @@ -312,7 +312,7 @@ sub active_workers { } if ($new_upid && !$thash->{$new_upid}) { - my $task = PVE::UPID::decode($new_upid); + my $task = PVE::UPID::decode($new_upid, 0); $task->{upid} = $new_upid; $thash->{$new_upid} = $task; &$check_task($task, $nocheck); @@ -406,7 +406,7 @@ my $kill_process_group = sub { sub check_worker { my ($self, $upid, $killit) = @_; - my $task = PVE::UPID::decode($upid); + my $task = PVE::UPID::decode($upid, 0); my $running = PVE::ProcFSTools::check_process_running($task->{pid}, $task->{pstart}); diff --git a/src/PVE/UPID.pm b/src/PVE/UPID.pm index 1256ec3..9913531 100644 --- a/src/PVE/UPID.pm +++ b/src/PVE/UPID.pm @@ -59,7 +59,7 @@ sub decode($upid, $noerr) { } sub open_log($upid) { - my ($task, $filename) = decode($upid); + my ($task, $filename) = decode($upid, 0); my $dirname = dirname($filename); make_path($dirname); @@ -77,7 +77,7 @@ sub open_log($upid) { } sub read_status($upid) { - my ($task, $filename) = decode($upid); + my ($task, $filename) = decode($upid, 0); my $fh = IO::File->new($filename, "r") or return "unable to open file - $!"; my $maxlen = 4096; -- 2.47.3 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel