From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:40698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkLFQ-0002Gi-Kb for qemu-devel@nongnu.org; Fri, 22 Jul 2011 15:18:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QkLFO-0002Vx-NK for qemu-devel@nongnu.org; Fri, 22 Jul 2011 15:18:56 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:49550) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QkLFO-0002Vo-DJ for qemu-devel@nongnu.org; Fri, 22 Jul 2011 15:18:54 -0400 Received: by gyf2 with SMTP id 2so1673722gyf.4 for ; Fri, 22 Jul 2011 12:18:53 -0700 (PDT) Message-ID: <4E29CD1A.3070605@codemonkey.ws> Date: Fri, 22 Jul 2011 14:18:50 -0500 From: Anthony Liguori MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qga: fsfreeze is only supported on Linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel , Michael Roth , Luiz Capitulino On 07/22/2011 01:56 PM, Blue Swirl wrote: > Fix build breakage on non-Linux hosts. > > Signed-off-by: Blue Swirl The patch I sent was similar but QAPI commands don't use in-band error reporting so it set the out-of-band error. I'll push my version if you can confirm it addresses the build issue. Regards, Anthony Liguori > --- > qga/guest-agent-commands.c | 25 ++++++++++++++++++++++++- > 1 files changed, 24 insertions(+), 1 deletions(-) > > diff --git a/qga/guest-agent-commands.c b/qga/guest-agent-commands.c > index 8c0d67e..918aaa2 100644 > --- a/qga/guest-agent-commands.c > +++ b/qga/guest-agent-commands.c > @@ -11,10 +11,12 @@ > */ > > #include > -#include > #include > #include > +#ifdef __linux__ > +#include > #include > +#endif > #include "qga/guest-agent-core.h" > #include "qga-qmp-commands.h" > #include "qerror.h" > @@ -22,6 +24,7 @@ > > static GAState *ga_state; > > +#ifdef __linux__ > static void disable_logging(void) > { > ga_disable_logging(ga_state); > @@ -31,6 +34,7 @@ static void enable_logging(void) > { > ga_enable_logging(ga_state); > } > +#endif > > /* Note: in some situations, like with the fsfreeze, logging may be > * temporarilly disabled. if it is necessary that a command be able > @@ -323,6 +327,7 @@ static void guest_file_init(void) > QTAILQ_INIT(&guest_file_state.filehandles); > } > > +#ifdef __linux__ > typedef struct GuestFsfreezeMount { > char *dirname; > char *devtype; > @@ -508,11 +513,29 @@ static void guest_fsfreeze_cleanup(void) > } > } > } > +#else > +GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **err) > +{ > + return GUEST_FSFREEZE_STATUS_ERROR; > +} > + > +int64_t qmp_guest_fsfreeze_freeze(Error **err) > +{ > + return -1; > +} > + > +int64_t qmp_guest_fsfreeze_thaw(Error **err) > +{ > + return 0; > +} > +#endif > > /* register init/cleanup routines for stateful command groups */ > void ga_command_state_init(GAState *s, GACommandState *cs) > { > ga_state = s; > +#ifdef __linux__ > ga_command_state_add(cs, guest_fsfreeze_init, guest_fsfreeze_cleanup); > +#endif > ga_command_state_add(cs, guest_file_init, NULL); > }