mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-02 13:30:18 +00:00
monitor: allow passing timeout for a HMP command
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.ebner@proxmox.com>
This commit is contained in:
parent
46e0b1eb62
commit
4ee69c54f6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user