From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SB96A-00082i-TB for qemu-devel@nongnu.org; Fri, 23 Mar 2012 14:20:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SB966-0001Ie-1H for qemu-devel@nongnu.org; Fri, 23 Mar 2012 14:20:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62403) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SB965-0001IV-Ok for qemu-devel@nongnu.org; Fri, 23 Mar 2012 14:20:21 -0400 Date: Fri, 23 Mar 2012 15:20:22 -0300 From: Luiz Capitulino Message-ID: <20120323152022.1251ed9d@doriath.home> In-Reply-To: <1332291249-18212-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com> <1332291249-18212-1-git-send-email-mdroth@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: mprivozn@redhat.com, qemu-devel@nongnu.org On Tue, 20 Mar 2012 19:54:09 -0500 Michael Roth wrote: > This currently breaks the build for BSDs. > > Signed-off-by: Michael Roth > --- > qga/commands-posix.c | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/qga/commands-posix.c b/qga/commands-posix.c > index 89dde92..16737d7 100644 > --- a/qga/commands-posix.c > +++ b/qga/commands-posix.c > @@ -24,10 +24,12 @@ > > #include > #include > +#if defined(__linux__) > #include > #include > #include > #include > +#endif > #include > #include "qga/guest-agent-core.h" > #include "qga-qmp-commands.h" > @@ -542,6 +544,7 @@ int64_t qmp_guest_fsfreeze_thaw(Error **err) > #define SUSPEND_SUPPORTED 0 > #define SUSPEND_NOT_SUPPORTED 1 Missing the macros and I think reopen_fd_to_null() is missing too, also doesn't apply to latest master. > > +#if defined(__linux__) > /** > * This function forks twice and the information about the mode support > * status is passed to the qemu-ga process via a pipe. > @@ -729,6 +732,25 @@ void qmp_guest_suspend_hybrid(Error **err) > guest_suspend("pm-suspend-hybrid", NULL, err); > } > > +#else /* defined(linux) */ > + > +void qmp_guest_suspend_disk(Error **err) > +{ > + error_set(err, QERR_UNSUPPORTED); > +} > + > +void qmp_guest_suspend_ram(Error **err) > +{ > + error_set(err, QERR_UNSUPPORTED); > +} > + > +void qmp_guest_suspend_hybrid(Error **err) > +{ > + error_set(err, QERR_UNSUPPORTED); > +} > + > +#endif > + > #if defined(__linux__) I think it would be nice to reorganize the functions in this file so that we could have only one #if defined(__linux__) (or even split this into two files)... > static GuestNetworkInterfaceList * > guest_find_interface(GuestNetworkInterfaceList *head,