* [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64
@ 2013-03-15 5:04 Peter Crosthwaite
2013-03-15 12:39 ` Alexander Graf
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Peter Crosthwaite @ 2013-03-15 5:04 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, aliguori, Peter Crosthwaite, mdroth
These functions don't exist until glib version 2.26. QEMU is currently only
mandating glib 2.12.
This patch replaces the functions with g_key_file_get/set_integer.
Unbreaks the build on Ubuntu 10.04 and RHEL 5.6.
Regression was introduced by 39097daf15c42243742667607d2cad2c9dc4f764
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---
qga/main.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/qga/main.c b/qga/main.c
index 99346e1..74ef788 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -755,7 +755,7 @@ static void persistent_state_from_keyfile(GAPersistentState *pstate,
if (g_key_file_has_key(keyfile, "global", "fd_counter", NULL)) {
pstate->fd_counter =
- g_key_file_get_int64(keyfile, "global", "fd_counter", NULL);
+ g_key_file_get_integer(keyfile, "global", "fd_counter", NULL);
}
}
@@ -765,7 +765,7 @@ static void persistent_state_to_keyfile(const GAPersistentState *pstate,
g_assert(pstate);
g_assert(keyfile);
- g_key_file_set_int64(keyfile, "global", "fd_counter", pstate->fd_counter);
+ g_key_file_set_integer(keyfile, "global", "fd_counter", pstate->fd_counter);
}
static gboolean write_persistent_state(const GAPersistentState *pstate,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64
2013-03-15 5:04 [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64 Peter Crosthwaite
@ 2013-03-15 12:39 ` Alexander Graf
2013-03-15 14:12 ` Michael Roth
2013-03-15 17:48 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2013-03-15 12:39 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: blauwirbel, aliguori, qemu-devel, mdroth
On 15.03.2013, at 06:04, Peter Crosthwaite wrote:
> These functions don't exist until glib version 2.26. QEMU is currently only
> mandating glib 2.12.
>
> This patch replaces the functions with g_key_file_get/set_integer.
>
> Unbreaks the build on Ubuntu 10.04 and RHEL 5.6.
>
> Regression was introduced by 39097daf15c42243742667607d2cad2c9dc4f764
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Thanks, this fixes the build for me on openSUSE 11.1 as well.
Acked-by: Alexander Graf <agraf@suse.de>
I also applied to patch to ppc-next, as I can't build without it, but I'd prefer if someone applies the patch directly to the tree ASAP.
Alex
> ---
> qga/main.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qga/main.c b/qga/main.c
> index 99346e1..74ef788 100644
> --- a/qga/main.c
> +++ b/qga/main.c
> @@ -755,7 +755,7 @@ static void persistent_state_from_keyfile(GAPersistentState *pstate,
>
> if (g_key_file_has_key(keyfile, "global", "fd_counter", NULL)) {
> pstate->fd_counter =
> - g_key_file_get_int64(keyfile, "global", "fd_counter", NULL);
> + g_key_file_get_integer(keyfile, "global", "fd_counter", NULL);
> }
> }
>
> @@ -765,7 +765,7 @@ static void persistent_state_to_keyfile(const GAPersistentState *pstate,
> g_assert(pstate);
> g_assert(keyfile);
>
> - g_key_file_set_int64(keyfile, "global", "fd_counter", pstate->fd_counter);
> + g_key_file_set_integer(keyfile, "global", "fd_counter", pstate->fd_counter);
> }
>
> static gboolean write_persistent_state(const GAPersistentState *pstate,
> --
> 1.7.0.4
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64
2013-03-15 5:04 [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64 Peter Crosthwaite
2013-03-15 12:39 ` Alexander Graf
@ 2013-03-15 14:12 ` Michael Roth
2013-03-15 17:48 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Michael Roth @ 2013-03-15 14:12 UTC (permalink / raw)
To: Peter Crosthwaite; +Cc: blauwirbel, aliguori, qemu-devel
On Fri, Mar 15, 2013 at 12:04 AM, Peter Crosthwaite
<peter.crosthwaite@xilinx.com> wrote:
> These functions don't exist until glib version 2.26. QEMU is currently only
> mandating glib 2.12.
>
> This patch replaces the functions with g_key_file_get/set_integer.
>
> Unbreaks the build on Ubuntu 10.04 and RHEL 5.6.
>
> Regression was introduced by 39097daf15c42243742667607d2cad2c9dc4f764
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
This introduces a corner-case case when fd_counter reaches MAX_INT32 and
the agent is restarted, but since that's not likely to occur any time
soon, let's fix
the build now, and I can send a follow-up afterward.
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
> qga/main.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/qga/main.c b/qga/main.c
> index 99346e1..74ef788 100644
> --- a/qga/main.c
> +++ b/qga/main.c
> @@ -755,7 +755,7 @@ static void persistent_state_from_keyfile(GAPersistentState *pstate,
>
> if (g_key_file_has_key(keyfile, "global", "fd_counter", NULL)) {
> pstate->fd_counter =
> - g_key_file_get_int64(keyfile, "global", "fd_counter", NULL);
> + g_key_file_get_integer(keyfile, "global", "fd_counter", NULL);
> }
> }
>
> @@ -765,7 +765,7 @@ static void persistent_state_to_keyfile(const GAPersistentState *pstate,
> g_assert(pstate);
> g_assert(keyfile);
>
> - g_key_file_set_int64(keyfile, "global", "fd_counter", pstate->fd_counter);
> + g_key_file_set_integer(keyfile, "global", "fd_counter", pstate->fd_counter);
> }
>
> static gboolean write_persistent_state(const GAPersistentState *pstate,
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64
2013-03-15 5:04 [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64 Peter Crosthwaite
2013-03-15 12:39 ` Alexander Graf
2013-03-15 14:12 ` Michael Roth
@ 2013-03-15 17:48 ` Anthony Liguori
2 siblings, 0 replies; 4+ messages in thread
From: Anthony Liguori @ 2013-03-15 17:48 UTC (permalink / raw)
To: Peter Crosthwaite, qemu-devel; +Cc: blauwirbel, aliguori, mdroth
Applied. Thanks.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-15 17:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-15 5:04 [Qemu-devel] [PATCH build-breaker] qga/main.c: Don't use g_key_file_get/set_int64 Peter Crosthwaite
2013-03-15 12:39 ` Alexander Graf
2013-03-15 14:12 ` Michael Roth
2013-03-15 17:48 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).