]> git.proxmox.com Git - qemu-server.git/commitdiff
Append newline to all QGA commands
authorKamil Trzcinski <ayufan@ayufan.eu>
Mon, 9 Mar 2020 13:32:44 +0000 (14:32 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 11 Mar 2020 10:11:45 +0000 (11:11 +0100)
Since the MacOS Mojave Apple ships AppleQEMUGuestAgent by default.
However, it does not fully adhere to QGA specs as they do expect each
command to be newline delimited.

This makes each command to be newline delimited which is harmless for
all other systems (Windows, Linux), but enable guest agent by default
without any changes on OSX.

Signed-off-by: Kamil Trzcinski <ayufan@ayufan.eu>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/QMPClient.pm

index b5c692148891821dbcc9c77dd1c010e9071d732d..90cba64d61b6941737e9d9678ffd1d72fabe117b 100644 (file)
@@ -263,8 +263,8 @@ my $check_queue = sub {
            if ($qga) {
 
                $qmpcmd = to_json({ execute => 'guest-sync-delimited',
-                                   arguments => { id => int($cmd->{id})}}) .
-                   to_json({ execute => $cmd->{execute}, arguments => $cmd->{arguments}});
+                                   arguments => { id => int($cmd->{id})}}) . "\n" .
+                   to_json({ execute => $cmd->{execute}, arguments => $cmd->{arguments}}) . "\n";
 
            } else {