dacc5246 | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: conditionalize schema for commands unsupported on non-Linux POSIX
Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully
qga: conditionalize schema for commands unsupported on non-Linux POSIX
Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on non-Linux POSIX platforms
The command will be rejected at QMP dispatch time instead, avoiding reimplementing rejection by blocking the stub commands. This changes the error message for affected commands from
{"class": "CommandNotFound", "desc": "Command FOO has been disabled"}
to
{"class": "CommandNotFound", "desc": "The command FOO has not been found"}
This has the additional benefit that the QGA protocol reference now documents what conditions enable use of the command.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240712132459.3974109-10-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
0e90127d | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: conditionalize schema for commands unsupported on Windows
Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude
qga: conditionalize schema for commands unsupported on Windows
Rather than creating stubs for every command that just return QERR_UNSUPPORTED, use 'if' conditions in the QAPI schema to fully exclude generation of the commands on Windows.
The command will be rejected at QMP dispatch time instead, avoiding reimplementing rejection by blocking the stub commands. This changes the error message for affected commands from
{"class": "CommandNotFound", "desc": "Command FOO has been disabled"}
to
{"class": "CommandNotFound", "desc": "The command FOO has not been found"}
This also fixes an accidental inconsistency where some commands (guest-get-diskstats & guest-get-cpustats) are implemented as stubs, yet not added to the blockedrpc list. Those change their error message from
{"class": "GenericError, "desc": "this feature or command is not currently supported"}
to
{"class": "CommandNotFound", "desc": "The command FOO has not been found"}
The final additional benefit is that the QGA protocol reference now documents what conditions enable use of the command.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240712132459.3974109-9-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
4bb3da4b | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move CONFIG_FSFREEZE/TRIM to be meson defined options
Defining these at the meson level allows them to be used a conditional tests in the QAPI schemas.
Signed-off-by: Daniel P. Berrangé <berra
qga: move CONFIG_FSFREEZE/TRIM to be meson defined options
Defining these at the meson level allows them to be used a conditional tests in the QAPI schemas.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240712132459.3974109-8-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
8b93e568 | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move linux memory block command impls to commands-linux.c
The qmp_guest_{set,get}_{memory_blocks,block_info} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should ins
qga: move linux memory block command impls to commands-linux.c
The qmp_guest_{set,get}_{memory_blocks,block_info} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c
This also removes a "#ifdef CONFIG_LINUX" that was nested inside a "#ifdef __linux__".
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-ID: <20240712132459.3974109-7-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
74cbd9bc | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move linux disk/cpu stats command impls to commands-linux.c
The qmp_guest_{diskstats,cpustats} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in c
qga: move linux disk/cpu stats command impls to commands-linux.c
The qmp_guest_{diskstats,cpustats} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c
This also removes a "#ifdef CONFIG_LINUX" that was nested inside a "#ifdef __linux__".
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Message-ID: <20240712132459.3974109-6-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
329cefe4 | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move linux fs/disk command impls to commands-linux.c
The qmp_guest_{fstrim, get_fsinfo, get_disks} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live
qga: move linux fs/disk command impls to commands-linux.c
The qmp_guest_{fstrim, get_fsinfo, get_disks} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240712132459.3974109-5-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
0c6f8824 | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move linux suspend command impls to commands-linux.c
The qmp_guest_suspend_{disk,ram,hybrid} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in com
qga: move linux suspend command impls to commands-linux.c
The qmp_guest_suspend_{disk,ram,hybrid} command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240712132459.3974109-4-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
4210027b | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: move linux vcpu command impls to commands-linux.c
The qmp_guest_set_vcpus and qmp_guest_get_vcpus command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live i
qga: move linux vcpu command impls to commands-linux.c
The qmp_guest_set_vcpus and qmp_guest_get_vcpus command impls in commands-posix.c are surrounded by '#ifdef __linux__' so should instead live in commands-linux.c
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240712132459.3974109-3-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
66181376 | 12-Jul-2024 |
Daniel P. Berrangé <berrange@redhat.com> |
qga: drop blocking of guest-get-memory-block-size command
This command has never existed in tree, since it was renamed to guest-get-memory-block-info before being merged.
Reviewed-by: Manos Pitsidi
qga: drop blocking of guest-get-memory-block-size command
This command has never existed in tree, since it was renamed to guest-get-memory-block-info before being merged.
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240712132459.3974109-2-berrange@redhat.com> Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
649c6fa4 | 26-Jun-2024 |
John Snow <jsnow@redhat.com> |
qapi: update prose in note blocks
Where I've noticed, rephrase the note to read more fluently.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message
qapi: update prose in note blocks
Where I've noticed, rephrase the note to read more fluently.
Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240626222128.406106-12-jsnow@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
d461c279 | 26-Jun-2024 |
John Snow <jsnow@redhat.com> |
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially parsed section, these notes can be treated as normal rST paragraphs in the new QMP
qapi: convert "Note" sections to plain rST
We do not need a dedicated section for notes. By eliminating a specially parsed section, these notes can be treated as normal rST paragraphs in the new QMP reference manual, and can be placed and styled much more flexibly.
Convert all existing "Note" and "Notes" sections to pure rST. As part of the conversion, capitalize the first letter of each sentence and add trailing punctuation where appropriate to ensure notes look sensible and consistent in rendered HTML documentation. Markup is also re-aligned to the de-facto standard of 3 spaces for directives.
Update docs/devel/qapi-code-gen.rst to reflect the new paradigm, and update the QAPI parser to prohibit "Note" sections while suggesting a new syntax. The exact formatting to use is a matter of taste, but a good candidate is simply:
.. note:: lorem ipsum ... ... dolor sit amet ... ... consectetur adipiscing elit ...
... but there are other choices, too. The Sphinx readthedocs theme offers theming for the following forms (capitalization unimportant); all are adorned with a (!) symbol () in the title bar for rendered HTML docs.
See https://sphinx-rtd-theme.readthedocs.io/en/stable/demo/demo.html#admonitions for examples of each directive/admonition in use.
These are rendered in orange:
.. Attention:: ... .. Caution:: ... .. WARNING:: ...
These are rendered in red:
.. DANGER:: ... .. Error:: ...
These are rendered in green:
.. Hint:: ... .. Important:: ... .. Tip:: ...
These are rendered in blue:
.. Note:: ... .. admonition:: custom title
admonition body text
This patch uses ".. note::" almost everywhere, with just two "caution" directives. Several instances of "Notes:" have been converted to merely ".. note::", or multiple ".. note::" where appropriate. ".. admonition:: notes" is used in a few places where we had an ordered list of multiple notes that would not make sense as standalone/separate admonitions. Two "Note:" following "Example:" have been turned into ordinary paragraphs within the example.
NOTE: Because qapidoc.py does not attempt to preserve source ordering of sections, the conversion of Notes from a "tagged section" to an "untagged section" means that rendering order for some notes *may change* as a result of this patch. The forthcoming qapidoc.py rewrite strictly preserves source ordering in the rendered documentation, so this issue will be rectified in the new generator.
Signed-off-by: John Snow <jsnow@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> [for block*.json] Message-ID: <20240626222128.406106-11-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Commit message clarified slightly, period added to one more note] Signed-off-by: Markus Armbruster <armbru@redhat.com>
show more ...
|
a7a2d636 | 30-May-2024 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
qga: Remove deprecated 'blacklist' argument / config key
The 'blacklist' argument / config key are deprecated since commit 582a098e6c ("qga: Replace 'blacklist' command line and config file options
qga: Remove deprecated 'blacklist' argument / config key
The 'blacklist' argument / config key are deprecated since commit 582a098e6c ("qga: Replace 'blacklist' command line and config file options by 'block-rpcs'"), time to remove them.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Message-Id: <20240530070413.19181-1-philmd@linaro.org>
show more ...
|
cec07c79 | 14-May-2024 |
Markus Armbruster <armbru@redhat.com> |
qga: Shorten several error messages
Some, but not all error messages are of the form
Guest agent command failed, error was '<actual error message>'
For instance, command guest-exec can fail wi
qga: Shorten several error messages
Some, but not all error messages are of the form
Guest agent command failed, error was '<actual error message>'
For instance, command guest-exec can fail with an error message like
Guest agent command failed, error was 'Failed to execute child process “/bin/invalid-cmd42” (No such file or directory)'
Shorten this to just just the actual error message. The guest-exec example becomes
Failed to execute child process “/bin/invalid-cmd42” (No such file or directory)
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240514105829.729342-3-armbru@redhat.com> [Superfluous #include "qapi/qmp/qerror.h" deleted] Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
ecfc9890 | 14-May-2024 |
Markus Armbruster <armbru@redhat.com> |
qga-win32: Improve guest-set-user-password, guest-file-open errors
When guest-set-user-password's argument @password can't be converted from UTF-8 to UTF-16, we report something like
Guest agen
qga-win32: Improve guest-set-user-password, guest-file-open errors
When guest-set-user-password's argument @password can't be converted from UTF-8 to UTF-16, we report something like
Guest agent command failed, error was 'Invalid sequence in conversion input'
Improve this to
can't convert 'password' to UTF-16: Invalid sequence in conversion input
Likewise for argument @username, and guest-file-open argument @path, even though I'm not sure you can actually get invalid input past the QMP core there.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-ID: <20240514105829.729342-2-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
82fe5d08 | 18-Apr-2024 |
Thomas Huth <thuth@redhat.com> |
Remove glib compatibility code that is not required anymore
Now that we bumped the minimum glib version to 2.66, we can drop the old code.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed
Remove glib compatibility code that is not required anymore
Now that we bumped the minimum glib version to 2.66, we can drop the old code.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240418101056.302103-9-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
0d8caac9 | 18-Apr-2024 |
Thomas Huth <thuth@redhat.com> |
Bump minimum glib version to v2.66
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.
Bump minimum glib version to v2.66
Now that we dropped support for CentOS 8 and Ubuntu 20.04, we can look into bumping the glib version to a new minimum for further clean-ups. According to repology.org, available versions are:
CentOS Stream 9: 2.66.7 Debian 11: 2.66.8 Fedora 38: 2.74.1 Freebsd: 2.78.4 Homebrew: 2.80.0 Openbsd: 2.78.4 OpenSuse leap 15.5: 2.70.5 pkgsrc_current: 2.78.4 Ubuntu 22.04: 2.72.1
Thus it should be safe to bump the minimum glib version to 2.66 now. Version 2.66 comes with new functions for URI parsing which will allow further clean-ups in the following patches.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-ID: <20240418101056.302103-8-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
show more ...
|
deb686ef | 03-May-2024 |
Paolo Bonzini <pbonzini@redhat.com> |
qga/commands-posix: fix typo in qmp_guest_set_user_password
qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else br
qga/commands-posix: fix typo in qmp_guest_set_user_password
qga/commands-posix.c does not compile on FreeBSD due to a confusion between "chpasswdata" (wrong) and "chpasswddata" (used in the #else branch).
Fixes: 0e5b75a390 ("qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper") Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
6b9296ba | 24-Apr-2024 |
aidaleuc <aidan_leuck@selinc.com> |
qga: Implement SSH commands for Windows
Signed-off-by: Aidan Leuck <aidan_leuck@selinc.com> Tested-by: Dehan Meng <demeng@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Link: http
qga: Implement SSH commands for Windows
Signed-off-by: Aidan Leuck <aidan_leuck@selinc.com> Tested-by: Dehan Meng <demeng@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Link: https://lore.kernel.org/r/20240424144029.30665-3-aidan_leuck@selinc.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
1cc99327 | 24-Apr-2024 |
aidaleuc <aidan_leuck@selinc.com> |
qga: Refactor common SSH functions
Message-Id: <20240424144029.30665-2-aidan_leuck@selinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit
In prepara
qga: Refactor common SSH functions
Message-Id: <20240424144029.30665-2-aidan_leuck@selinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit
In preparation of a Windows implementation, move the non-POSIX specific code to commands-common-ssh.
Signed-off-by: Aidan Leuck <aidan_leuck@selinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Dehan Meng <demeng@redhat.com> Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com> Link: https://lore.kernel.org/r/20240424144029.30665-2-aidan_leuck@selinc.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
0e5b75a3 | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper
There's no need to check for the existence of the "chpasswd", "pw" executables, as the exec() call will do that for us.
Si
qga/commands-posix: qmp_guest_set_user_password: use ga_run_command helper
There's no need to check for the existence of the "chpasswd", "pw" executables, as the exec() call will do that for us.
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-8-andrey.drobyshev@virtuozzo.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
20481296 | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga/commands-posix: don't do fork()/exec() when suspending via sysfs
Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys logic") pm-utils logic is running in a separate child fr
qga/commands-posix: don't do fork()/exec() when suspending via sysfs
Since commit 246d76eba ("qga: guest_suspend: decoupling pm-utils and sys logic") pm-utils logic is running in a separate child from the sysfs logic. Now when suspending via sysfs we don't really need to do that in a separate process as we only need to perform one write to /sys/power/state.
Let's just use g_file_set_contents() to simplify things here.
Suggested-by: Daniel P. Berrangé <berrange@redhat.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-7-andrey.drobyshev@virtuozzo.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
8ef383b4 | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper
There's no need to check for the existence of the hook executable, as the exec() call will do that for us.
Signed-off-by: Andrey
qga/commands-posix: execute_fsfreeze_hook: use ga_run_command helper
There's no need to check for the existence of the hook executable, as the exec() call will do that for us.
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-6-andrey.drobyshev@virtuozzo.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
1fce82bc | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga/commands-posix: qmp_guest_set_time: use ga_run_command helper
There's no need to check for the existence of "/sbin/hwclock", the exec() call will do that for us.
Signed-off-by: Andrey Drobyshev
qga/commands-posix: qmp_guest_set_time: use ga_run_command helper
There's no need to check for the existence of "/sbin/hwclock", the exec() call will do that for us.
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-5-andrey.drobyshev@virtuozzo.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
123f040a | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
Also remove the G_GNUC_UNUSED attribute added in the previous commit from the helper.
Signed-off-by: Andrey Drobyshev <andrey.droby
qga/commands-posix: qmp_guest_shutdown: use ga_run_command helper
Also remove the G_GNUC_UNUSED attribute added in the previous commit from the helper.
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-4-andrey.drobyshev@virtuozzo.com Signed-off-by: Konstantin Kostiuk <kkostiuk@redhat.com>
show more ...
|
c3f32c13 | 20-Mar-2024 |
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> |
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
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>
show more ...
|