From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id A7D741FF13A for ; Wed, 27 May 2026 13:01:44 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 67063187B8; Wed, 27 May 2026 13:01:18 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server 5/6] run state: use v5.36 and signatures in module Date: Wed, 27 May 2026 13:00:49 +0200 Message-ID: <20260527110106.287916-6-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260527110106.287916-1-f.ebner@proxmox.com> References: <20260527110106.287916-1-f.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1779879644207 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.009 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 Message-ID-Hash: VJLSS52PF2Q63TFT43T2MUGM46EJ6ANO X-Message-ID-Hash: VJLSS52PF2Q63TFT43T2MUGM46EJ6ANO X-MailFrom: f.ebner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Signed-off-by: Fiona Ebner --- src/PVE/QemuServer/RunState.pm | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/PVE/QemuServer/RunState.pm b/src/PVE/QemuServer/RunState.pm index bbbcc88e..2d98e6bb 100644 --- a/src/PVE/QemuServer/RunState.pm +++ b/src/PVE/QemuServer/RunState.pm @@ -1,7 +1,6 @@ package PVE::QemuServer::RunState; -use strict; -use warnings; +use v5.36; use POSIX qw(strftime); @@ -16,8 +15,7 @@ use PVE::QemuServer::Monitor qw(mon_cmd); use PVE::QemuServer::Network; # note: if using the statestorage parameter, the caller has to check privileges -sub vm_suspend { - my ($vmid, $skiplock, $includestate, $statestorage) = @_; +sub vm_suspend($vmid, $skiplock = undef, $includestate = undef, $statestorage = undef) { my $conf; my $path; @@ -127,8 +125,7 @@ sub vm_suspend { # $nocheck is set when called as part of a migration - in this context the # location of the config file (source or target node) is not deterministic, # since migration cannot wait for pmxcfs to process the rename -sub vm_resume { - my ($vmid, $skiplock, $nocheck) = @_; +sub vm_resume($vmid, $skiplock = undef, $nocheck = undef) { PVE::QemuConfig->lock_config( $vmid, @@ -184,32 +181,29 @@ sub vm_resume { ); } -sub get_cleanup_flag_path { - my ($vmid) = @_; +sub get_cleanup_flag_path($vmid) { return "/run/qemu-server/$vmid.cleanup"; } -sub create_cleanup_flag { - my ($vmid) = @_; +sub create_cleanup_flag($vmid) { # write time so we could check in a timeout if needed PVE::File::file_set_contents(get_cleanup_flag_path($vmid), time()); } -sub clear_cleanup_flag { - my ($vmid) = @_; +sub clear_cleanup_flag($vmid) { my $path = get_cleanup_flag_path($vmid); unlink $path or $! == POSIX::ENOENT or die "removing cleanup flag for $vmid failed: $!\n"; } -sub cleanup_flag_exists { - my ($vmid) = @_; +sub cleanup_flag_exists($vmid) { return -f get_cleanup_flag_path($vmid); } # checks if /run/qemu-server/force-legacy-cleanup exists that will be created on # package update and cleared on bootup so we can be sure the guests were # started recently enough -sub can_use_cleanup_flag { +sub can_use_cleanup_flag() { !-f "/run/qemu-server/force-legacy-cleanup"; } + 1; -- 2.47.3