[PATCH 0/7] qga/commands-posix: replace code duplicating commands with a helper

Andrey Drobyshev posted 7 patches 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240226165642.807350-1-andrey.drobyshev@virtuozzo.com
Maintainers: Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>
There is a newer version of this series
qga/commands-posix.c | 402 +++++++++++++++++++------------------------
qga/qapi-schema.json |  11 +-
2 files changed, 181 insertions(+), 232 deletions(-)
[PATCH 0/7] qga/commands-posix: replace code duplicating commands with a helper
Posted by Andrey Drobyshev 9 months ago
This series simply replaces repeating fork()/exec() pattern with a
separate helper to avoid code duplication.  It's easier to setup and use
than g_spawn_async_with_pipes() (which we'd need since some commands require
input).  While here, also make qmp_guest_get_fsinfo return more
straightforward values.

Andrey Drobyshev (7):
  qga/commands-posix: return fsinfo values directly as reported by
    statvfs
  qga: introduce ga_run_command() helper for guest cmd execution
  qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
  qga/commands-posix: qmp_guest_set_time: use ga_run_command helper
  qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper
  qga/commands-posix: use ga_run_command helper when suspending via
    sysfs
  qga/commands-posix: qmp_guest_set_user_password: use ga_run_command
    helper

 qga/commands-posix.c | 402 +++++++++++++++++++------------------------
 qga/qapi-schema.json |  11 +-
 2 files changed, 181 insertions(+), 232 deletions(-)

-- 
2.39.3