]> xenbits.xensource.com Git - qemu-xen.git/commit
qga: introduce ga_run_command() helper for guest cmd execution
authorAndrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Wed, 20 Mar 2024 16:16:43 +0000 (18:16 +0200)
committerKonstantin Kostiuk <kkostiuk@redhat.com>
Wed, 1 May 2024 07:10:08 +0000 (10:10 +0300)
commitc3f32c13a325f1ca9a0b08c19fefe9e5cc04289d
tree4b468c71aeb3d6eea9e4de94ed967ef36c499798
parent50761a5a9aeaed928807229a86d619b5251598ff
qga: introduce ga_run_command() helper for guest cmd execution

When executing guest commands in *nix environment, we repeat the same
fork/exec pattern multiple times.  Let's just separate it into a single
helper which would also be able to feed input data into the launched
process' stdin.  This way we can avoid code duplication.

To keep the history more bisectable, let's replace qmp commands
implementations one by one.  Also add G_GNUC_UNUSED attribute to the
helper and remove it in the next commit.

Originally-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
Link: https://lore.kernel.org/r/20240320161648.158226-3-andrey.drobyshev@virtuozzo.com
Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
qga/commands-posix.c