mirror of
				https://git.proxmox.com/git/qemu-server
				synced 2025-11-04 02:00:32 +00:00 
			
		
		
		
	qmpclient-qga : build qga command
example of command:
first json is guest-sync to sync and flush the client, second json is the command
{ "execute": "guest-sync", "arguments": { "id": 123456 } }{"execute":"guest-ping"}
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
			
			
This commit is contained in:
		
							parent
							
								
									c6fb6a6978
								
							
						
					
					
						commit
						a45a14fcf7
					
				@ -189,10 +189,27 @@ my $check_queue = sub {
 | 
			
		||||
		delete $cmd->{arguments}->{fd};
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	    my $qmpcmd = to_json({
 | 
			
		||||
		execute => $cmd->{execute},
 | 
			
		||||
		arguments => $cmd->{arguments},
 | 
			
		||||
		id => $cmd->{id}});
 | 
			
		||||
	    my $qmpcmd = undef;
 | 
			
		||||
 | 
			
		||||
	    if($self->{qga}){
 | 
			
		||||
 | 
			
		||||
		my $qmpcmdid =to_json({
 | 
			
		||||
		    execute => 'guest-sync',
 | 
			
		||||
		    arguments => { id => int($cmd->{id})}});
 | 
			
		||||
 | 
			
		||||
		$qmpcmd = to_json({
 | 
			
		||||
		    execute => $cmd->{execute},
 | 
			
		||||
		    arguments => $cmd->{arguments}});
 | 
			
		||||
 | 
			
		||||
		$qmpcmd = $qmpcmdid.$qmpcmd;
 | 
			
		||||
 | 
			
		||||
	    }else{
 | 
			
		||||
 | 
			
		||||
		$qmpcmd = to_json({
 | 
			
		||||
		    execute => $cmd->{execute},
 | 
			
		||||
		    arguments => $cmd->{arguments},
 | 
			
		||||
		    id => $cmd->{id}});
 | 
			
		||||
	    }
 | 
			
		||||
 | 
			
		||||
	    if ($fd >= 0) {
 | 
			
		||||
		my $ret = PVE::IPCC::sendfd(fileno($fh), $fd, $qmpcmd);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user