History | View | Annotate | Download (24.7 kB)
qemu-ga: Fix null pointer passed to unlink in failure branch
Clang reports this warning:
Null pointer passed as an argument to a 'nonnull' parameter
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-ga: don't leak a file descriptor upon failed lockf
Signed-off-by: Jim Meyering <meyering@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-ga: switch to the new error format on the wire
IMPORTANT: this BREAKS qemu-ga compatibility for the error response.
Instead of returning something like:
{ "error": { "class": "InvalidParameterValue", "data": {"name": "mode", "expected": "halt|powerdown|reboot" } } }...
error: drop error_get_qobject()/error_set_qobject()
error_get_qobject() is unused since last commit, error_set_qobject()has never been used. Also drops error_int.h.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>
Support 'help' as a synonym for '?' in command line options
For command line options which permit '?' meaning 'please list thepermitted values', add support for 'help' as a synonym, by abstractingthe check out into a helper function.
This change means that in some cases where we were being lazy in...
qemu-ga: align versioning with QEMU_VERSION
Previously qemu-ga version was defined seperately. Since it is alignedwith QEMU releases, use QEMU_VERSION instead. This also implies theversion bump for 1.1[-rcN] release of qemu-ga.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>...
qemu-ga: fix segv after failure to open log file
Currently, if we fail to open the specified log file (generally due to apermissions issue), we'll assign NULL to the logfile handle (stderr,initially) used by the logging routines, which can cause a segfault to...
qemu-ga: don't warn on no command return
This is a valid condition when a command chooses to not emit asuccess response.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-ga: make reopen_fd_to_null() public
The next commit wants to use it.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qemu-ga: become_daemon(): reopen standard fds to /dev/null
This fixes a bug where qemu-ga doesn't suspend the guest because itfails to detect suspend support even when the guest does supportsuspend. This happens because of the way qemu-ga fds are managed in...
qemu-ga: guest-suspend: make the API synchronous
Currently, qemu-ga has a SIGCHLD handler that automatically reaps terminatedchildren processes. The idea is to avoid having qemu-ga commands blockedwaiting for children to terminate.
That approach has two problems:...
fix some common typos
These were identified using: http://github.com/lyda/misspell-checkand run like this to create a bourne shell script using GNU sed's-i option:
git ls-files|grep -vF .bin | misspellings -f - |grep -v '^ERROR:' |perl \-pe 's/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/sed -i '\''${2}s!$3!$4!'\'' $1/'...
qemu-ga: persist tracking of fsfreeze state via filesystem
Currently, qemu-ga may die/get killed/go away for whatever reason afterguest-fsfreeze-freeze has been issued, and before guest-fsfreeze-thawhas been issued. This means the only way to unfreeze the guest is via...
qemu-ga: add a whitelist for fsfreeze-safe commands
Currently we rely on fsfreeze/thaw commands disabling/enabling loggingthen having other commands check whether logging is disabled to avoidexecuting if they aren't safe for running while a filesystem is frozen....
qemu-ga: fix help output
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
qemu-ga: add guest-sync-delimited
guest-sync leaves it as an exercise to the user as to how to reliablyobtain the response to guest-sync if the client had previously read in apartial response (due qemu-ga previously being restarted mid-"sentence" due to reboot, forced restart, etc)....
qemu-ga: add guest-suspend-disk
As the command name implies, this command suspends the guest to disk.
The suspend operation is implemented by two functions: bios_supports_mode()and guest_suspend(). Both functions are generic enough to be used byother suspend modes (introduced by next commits)....
qemu-ga: add Windows service integration
This allows qemu-ga to function as a Windows service:
- to install the service (will auto-start on boot): qemu-ga --service install - to start the service: net start qemu-ga - to stop the service: net stop qemu-ga...
qemu-ga: add initial win32 support
This adds a win32 channel implementation that makes qemu-ga functionalon Windows using virtio-serial (unix-listen/isa-serial not currentlyimplemented). Unlike with the posix implementation, we do not useGIOChannel for the following reasons:...
qemu-ga: move channel/transport functionality into wrapper class
This is mostly in preparation for the win32 port, which won't useGIO channels for reasons that will be made clearer later. Here theGAChannel class is just a loose wrapper around GIOChannel...
qemu-ga: fixes for win32 build of qemu-ga
Various stubs and #ifdefs to compile for Windows using mingwcross-build. Still has 1 linker error due to a dependency on theforthcoming win32 versions of the GAChannel/transport class.
Spelling fixes in comments and documentation
Codespell detected these new spelling issues.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
guest agent: add RPC blacklist command-line option
This adds a command-line option, -b/--blacklist, that accepts acomma-seperated list of RPCs to disable, or prints a list ofavailable RPCs if passed "?".
In consequence this also adds general blacklisting and RPC listing...
Fix spelling in comments and debug messages (recieve -> receive)
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Reviewed-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
guest agent: remove g_strcmp0 usage
g_strcmp0 isn't in all version of glib 2.0, so don't use it to avoidbuild breakage on older distros.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-ga: remove dependency on gio and gthread
As far as I can tell, there isn't a dependency on gthread. Also, the only useof gio was to enable GSocket to accept a unix domain socket.
Since GSocket isn't available on OpenSuSE 11.1, let's just remove that...
guest agent: qemu-ga daemon
This is the actual guest daemon, it listens for requests over avirtio-serial/isa-serial/unix socket channel and routes them throughto dispatch routines, and writes the results back to the channel ina manner similar to QMP....
guest agent: add guest agent RPCs/commands
This adds the initial set of QMP/QAPI commands provided by the guestagent:
guest-syncguest-pingguest-infoguest-shutdownguest-file-openguest-file-readguest-file-writeguest-file-seekguest-file-flushguest-file-close...