summaryrefslogtreecommitdiff
path: root/qga/main.c
AgeCommit message (Collapse)AuthorFilesLines
2013-01-14qemu-ga: Plug file descriptor leak on ga_open_pidfile() error pathMarkus Armbruster1-0/+2
Spotted by Coverity. Also document why we keep it open on success. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Drop pointless lseek() from ga_open_pidfile()Markus Armbruster1-1/+1
After open(), the file offset is already zero, and neither lockf() nor ftruncate() change it. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: Document intentional fall through in channel_event_cb()Markus Armbruster1-0/+1
For clarity, and to hush up Coverity. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: add ga_open_logfile()Luiz Capitulino1-2/+15
This function sets O_CLOEXEC on the log file fd so that it isn't leaked to executed processes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Amos Kong <akong@redhat.com> Tested-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-14qemu-ga: ga_open_pidfile(): use qemu_open()Luiz Capitulino1-1/+1
This ensures that O_CLOEXEC is passed to open(), this way the pid file fd is not leaked to executed processes. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Acked-by: Amos Kong <akong@redhat.com> Tested-by: Amos Kong <akong@redhat.com> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2013-01-08qemu-ga: execute hook to quiesce the guest on fsfreeze-freeze/thawTomoki Sekiyama1-1/+47
To use the online disk snapshot for online-backup, application-level consistency of the snapshot image is required. However, currently the guest agent can provide only filesystem-level consistency, and the snapshot may contain dirty data, for example, incomplete transactions. This patch provides the opportunity to quiesce applications before snapshot is taken. If --fsfreeze-hook option is specified, the hook is executed with "freeze" argument before the filesystem is frozen by fsfreeze-freeze command. As for fsfreeze-thaw command, the hook is executed with "thaw" argument after the filesystem is thawed. This patch depends on patchset to improve error reporting by Luiz Capitulino: http://lists.gnu.org/archive/html/qemu-devel/2012-11/msg03016.html Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama.qu@hitachi.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> *clarified usage in help output Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qapi: move include files to include/qobject/Paolo Bonzini1-6/+6
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19qemu-ga: move qemu-ga files to qga/Paolo Bonzini1-0/+901
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>