[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] guest agent: fix for guest agent RPCs/commands
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH] guest agent: fix for guest agent RPCs/commands |
Date: |
Tue, 14 Jun 2011 19:13:09 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 |
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 <address@hidden>
---
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) {
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, (continued)
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, Luiz Capitulino, 2011/06/17
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, Michael Roth, 2011/06/19
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, Luiz Capitulino, 2011/06/20
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, Michael Roth, 2011/06/20
- Re: [Qemu-devel] [PATCH v5 2/5] guest agent: qemu-ga daemon, Luiz Capitulino, 2011/06/21
[Qemu-devel] [PATCH v5 1/5] guest agent: command state class, Michael Roth, 2011/06/14
[Qemu-devel] [PATCH v5 3/5] guest agent: add guest agent RPCs/commands, Michael Roth, 2011/06/14
[Qemu-devel] [PATCH v5 4/5] guest agent: add guest agent commands schema file, Michael Roth, 2011/06/14
[Qemu-devel] [PATCH v5 5/5] guest agent: Makefile, build qemu-ga, Michael Roth, 2011/06/14