From: Fiona Ebner <f.ebner@proxmox.com>
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 [thread overview]
Message-ID: <20260527110106.287916-6-f.ebner@proxmox.com> (raw)
In-Reply-To: <20260527110106.287916-1-f.ebner@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
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
next prev parent reply other threads:[~2026-05-27 11:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 11:00 [PATCH-SERIES qemu/qemu-server 0/6] fix #6424: avoid timeout issue for QMP 'quit' for bulk suspend Fiona Ebner
2026-05-27 11:00 ` [PATCH qemu 1/6] regenerate patches to restore incremental numbering Fiona Ebner
2026-05-27 11:00 ` [PATCH qemu 2/6] async snapshot: allow skipping VM start after successful completion Fiona Ebner
2026-05-27 11:00 ` [PATCH qemu 3/6] update submodule and patches to QEMU 11.0.1 Fiona Ebner
2026-05-27 11:00 ` [PATCH qemu-server 4/6] fix #6424: increase timeout for QMP 'quit' to 60s to avoid issue with bulk suspend Fiona Ebner
2026-05-27 11:00 ` Fiona Ebner [this message]
2026-05-27 11:00 ` [PATCH qemu-server 6/6] suspend: skip VM start after successfully saving state Fiona Ebner
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=20260527110106.287916-6-f.ebner@proxmox.com \
--to=f.ebner@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.