Passing the timeout key with an explicit value of undef is fine, because both the absence of the timeout key and an explicit value of undef will lead to $timeout being undef in the qmp_cmd() function.
In preparation to increase the timeout for certain (e.g. disk-related) HMP commands. Signed-off-by: Fiona Ebner <f.eb...@proxmox.com> --- PVE/QemuServer/Monitor.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/QemuServer/Monitor.pm b/PVE/QemuServer/Monitor.pm index a7567518..937006ae 100644 --- a/PVE/QemuServer/Monitor.pm +++ b/PVE/QemuServer/Monitor.pm @@ -50,11 +50,11 @@ sub mon_cmd { } sub hmp_cmd { - my ($vmid, $cmdline) = @_; + my ($vmid, $cmdline, $timeout) = @_; my $cmd = { execute => 'human-monitor-command', - arguments => { 'command-line' => $cmdline }, + arguments => { 'command-line' => $cmdline, timeout => $timeout }, }; return qmp_cmd($vmid, $cmd); -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel