From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49159) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA1eJ-0005Rl-46 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 12:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SA1e9-0003TJ-88 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 12:11:02 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:50614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA1e9-0003T1-14 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 12:10:53 -0400 Received: by yenr5 with SMTP id r5so248896yen.4 for ; Tue, 20 Mar 2012 09:10:51 -0700 (PDT) Sender: fluxion Date: Tue, 20 Mar 2012 11:10:46 -0500 From: Michael Roth Message-ID: <20120320161046.GA29058@illuin> References: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com> Subject: Re: [Qemu-devel] [PATCH] qemu-ga: Make guest-network-get-interfaces Linux only List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: qemu-devel@nongnu.org On Tue, Mar 20, 2012 at 04:09:53PM +0100, Michal Privoznik wrote: > Currently, the implementation of that command is full of > Linux specific code. Before any brave man will step into > and port it to other OSes, make this function Linux only. > > Signed-off-by: Michal Privoznik Which aspect is linux-specific? getifaddrs() and getnameinfo() seem to be available on BSD and OpenSolaris, and we're already stubbed for w32. Are you seeing breakage? > --- > qga/commands-posix.c | 11 +++++++++++ > 1 files changed, 11 insertions(+), 0 deletions(-) > > diff --git a/qga/commands-posix.c b/qga/commands-posix.c > index 7b2be2f..89dde92 100644 > --- a/qga/commands-posix.c > +++ b/qga/commands-posix.c > @@ -729,6 +729,7 @@ void qmp_guest_suspend_hybrid(Error **err) > guest_suspend("pm-suspend-hybrid", NULL, err); > } > > +#if defined(__linux__) > static GuestNetworkInterfaceList * > guest_find_interface(GuestNetworkInterfaceList *head, > const char *name) > @@ -904,6 +905,16 @@ error: > return NULL; > } > > +#else /* defined(linux) */ > + > +GuestNetworkInterfaceList *qmp_guest_network_get_interfaces(Error **err) > +{ > + error_set(err, QERR_UNSUPPORTED); > + return NULL; > +} > + > +#endif /* defined(linux) */ > + > /* register init/cleanup routines for stateful command groups */ > void ga_command_state_init(GAState *s, GACommandState *cs) > { > -- > 1.7.8.5 > >