qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: Make guest-network-get-interfaces	Linux only
Date: Tue, 20 Mar 2012 11:10:46 -0500	[thread overview]
Message-ID: <20120320161046.GA29058@illuin> (raw)
In-Reply-To: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com>

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 <mprivozn@redhat.com>

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
> 
> 

  reply	other threads:[~2012-03-20 16:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 15:09 [Qemu-devel] [PATCH] qemu-ga: Make guest-network-get-interfaces Linux only Michal Privoznik
2012-03-20 16:10 ` Michael Roth [this message]
2012-03-20 16:16   ` Michal Privoznik
2012-03-20 18:19     ` Michael Roth
2012-03-21  0:47       ` Michael Roth
2012-03-26 16:35   ` Andreas Färber
2012-03-26 18:47     ` Michael Roth
2012-03-21  0:54 ` [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux Michael Roth
2012-03-23 18:20   ` Luiz Capitulino
2012-03-23 19:11     ` Michael Roth
2012-03-23 20:37       ` Luiz Capitulino
2012-03-25 19:40         ` [Qemu-devel] [PATCH] qemu-ga: fix bsd build, and re-org linux-specific implementations Michael Roth
2012-03-26 16:22           ` Luiz Capitulino
2012-03-26 20:24           ` Brad Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120320161046.GA29058@illuin \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=mprivozn@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).