From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com, "MATSUDA,
Daiki" <matsudadik@intellilink.co.jp>,
agl@linux.vnet.ibm.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH] guest agent: fix for guest agent RPCs/commands
Date: Tue, 14 Jun 2011 19:13:09 -0500 [thread overview]
Message-ID: <4DF7F915.3080500@linux.vnet.ibm.com> (raw)
In-Reply-To: <1308081985-32394-4-git-send-email-mdroth@linux.vnet.ibm.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 <mdroth@linux.vnet.ibm.com>
---
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) {
next prev parent reply other threads:[~2011-06-15 0:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-14 20:06 [Qemu-devel] [QAPI+QGA 3/3] QEMU Guest Agent (virtagent) v5 Michael Roth
2011-06-14 20:06 ` [Qemu-devel] [PATCH v5 1/5] guest agent: command state class Michael Roth
2011-06-16 18:29 ` Luiz Capitulino
2011-06-16 18:46 ` Michael Roth
2011-06-16 19:04 ` Luiz Capitulino
2011-06-14 20:06 ` [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon Michael Roth
2011-06-16 18:42 ` Luiz Capitulino
2011-06-17 19:21 ` Michael Roth
2011-06-17 20:13 ` Luiz Capitulino
2011-06-17 21:25 ` Michael Roth
2011-06-18 3:25 ` Luiz Capitulino
2011-06-19 19:00 ` Michael Roth
2011-06-20 14:16 ` Luiz Capitulino
2011-06-20 23:40 ` Michael Roth
2011-06-21 13:38 ` Luiz Capitulino
2011-06-14 20:06 ` [Qemu-devel] [PATCH v5 3/5] guest agent: add guest agent RPCs/commands Michael Roth
2011-06-15 0:13 ` Michael Roth [this message]
2011-06-16 18:52 ` Luiz Capitulino
2011-06-17 20:19 ` Michael Roth
2011-06-18 2:38 ` Luiz Capitulino
2011-06-18 12:48 ` Luiz Capitulino
2011-06-14 20:06 ` [Qemu-devel] [PATCH v5 4/5] guest agent: add guest agent commands schema file Michael Roth
2011-06-14 20:06 ` [Qemu-devel] [PATCH v5 5/5] guest agent: Makefile, build qemu-ga Michael Roth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DF7F915.3080500@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=Jes.Sorensen@redhat.com \
--cc=agl@linux.vnet.ibm.com \
--cc=aliguori@linux.vnet.ibm.com \
--cc=lcapitulino@redhat.com \
--cc=matsudadik@intellilink.co.jp \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.