From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:35945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWdja-0003YO-Jl for qemu-devel@nongnu.org; Tue, 14 Jun 2011 20:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWdjZ-00055Q-4a for qemu-devel@nongnu.org; Tue, 14 Jun 2011 20:13:26 -0400 Received: from e33.co.us.ibm.com ([32.97.110.151]:43243) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWdjY-00055B-JJ for qemu-devel@nongnu.org; Tue, 14 Jun 2011 20:13:24 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e33.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id p5F05qee016852 for ; Tue, 14 Jun 2011 18:05:52 -0600 Received: from d03av05.boulder.ibm.com (d03av05.boulder.ibm.com [9.17.195.85]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id p5F0DE9x136824 for ; Tue, 14 Jun 2011 18:13:14 -0600 Received: from d03av05.boulder.ibm.com (loopback [127.0.0.1]) by d03av05.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5F0DEYu001355 for ; Tue, 14 Jun 2011 18:13:14 -0600 Message-ID: <4DF7F915.3080500@linux.vnet.ibm.com> Date: Tue, 14 Jun 2011 19:13:09 -0500 From: Michael Roth MIME-Version: 1.0 References: <1308081985-32394-1-git-send-email-mdroth@linux.vnet.ibm.com> <1308081985-32394-4-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1308081985-32394-4-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] guest agent: fix for guest agent RPCs/commands List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com, "MATSUDA, Daiki" , agl@linux.vnet.ibm.com, lcapitulino@redhat.com One of my commits must've gotten lost while I was squashing patches. Please apply the attached patch to correct a build issue due to qmp_guest_file_open()'s implementation not matching the qapi-generated prototype. Patch 3 has been updated in the corresponding repo branch if you're pulling from there. Thanks to Matsuda Daiki for catching this. Signed-off-by: Michael Roth --- diff --git a/qga/guest-agent-commands.c b/qga/guest-agent-commands.c index 6f9886a..dbdc3b7 100644 --- a/qga/guest-agent-commands.c +++ b/qga/guest-agent-commands.c @@ -169,7 +169,7 @@ static void guest_file_handle_remove(int64_t id) g_free(data); } -int64_t qmp_guest_file_open(const char *filepath, const char *mode, Error **err) +int64_t qmp_guest_file_open(const char *filepath, bool has_mode, const char *mode, Error **err) { FILE *fh; int fd, ret; @@ -179,6 +179,9 @@ int64_t qmp_guest_file_open(const char *filepath, const char *mode, Error **err) error_set(err, QERR_QGA_LOGGING_FAILED); goto out; } + if (!has_mode) { + mode = "r"; + } slog("guest-file-open called, filepath: %s, mode: %s", filepath, mode); fh = fopen(filepath, mode); if (!fh) {