This is where the actual commands/RPCs are defined. This patch is mostly just to serve as an example, but guest-ping actually does everything it needs to.
view_file will soon be replaced with a stateful open/read/close interface, and shutdown will be ported over from virtagent soon as well. Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com> --- guest-agent-commands.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) create mode 100644 guest-agent-commands.c diff --git a/guest-agent-commands.c b/guest-agent-commands.c new file mode 100644 index 0000000..ca8a894 --- /dev/null +++ b/guest-agent-commands.c @@ -0,0 +1,24 @@ +/* + * QEMU Guest Agent commands + * + * Copyright IBM Corp. 2011 + * + * Authors: + * Michael Roth <mdr...@linux.vnet.ibm.com> + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "guest-agent.h" + +void qga_guest_ping(Error **err) +{ +} + +char *qga_guest_view_file(const char *filename, Error **err) +{ + char *test_response = qemu_mallocz(512); + strcpy(test_response, "this is some text"); + return test_response; +} -- 1.7.0.4