From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33682 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q3Czs-00007i-F9 for qemu-devel@nongnu.org; Fri, 25 Mar 2011 15:48:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q3Czp-0006NO-Sr for qemu-devel@nongnu.org; Fri, 25 Mar 2011 15:48:34 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:41514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q3Czp-0006NK-QR for qemu-devel@nongnu.org; Fri, 25 Mar 2011 15:48:33 -0400 Received: from d01dlp01.pok.ibm.com (d01dlp01.pok.ibm.com [9.56.224.56]) by e2.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id p2PJTlrW007456 for ; Fri, 25 Mar 2011 15:29:47 -0400 Received: from d01relay05.pok.ibm.com (d01relay05.pok.ibm.com [9.56.227.237]) by d01dlp01.pok.ibm.com (Postfix) with ESMTP id 9011638C8039 for ; Fri, 25 Mar 2011 15:48:27 -0400 (EDT) Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay05.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p2PJmWFl204714 for ; Fri, 25 Mar 2011 15:48:32 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p2PJmW3f025207 for ; Fri, 25 Mar 2011 16:48:32 -0300 From: Michael Roth Date: Fri, 25 Mar 2011 14:47:58 -0500 Message-Id: <1301082479-4058-12-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1301082479-4058-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1301082479-4058-1-git-send-email-mdroth@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC][PATCH v1 11/12] guest agent: guest-side command implementations List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@linux.vnet.ibm.com, agl@linux.vnet.ibm.com, mdroth@linux.vnet.ibm.com, Jes.Sorensen@redhat.com 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 --- 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 + * + * 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