qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: mprivozn@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux
Date: Fri, 23 Mar 2012 15:20:22 -0300	[thread overview]
Message-ID: <20120323152022.1251ed9d@doriath.home> (raw)
In-Reply-To: <1332291249-18212-1-git-send-email-mdroth@linux.vnet.ibm.com>

On Tue, 20 Mar 2012 19:54:09 -0500
Michael Roth <mdroth@linux.vnet.ibm.com> wrote:

> This currently breaks the build for BSDs.
> 
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
>  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 <sys/types.h>
>  #include <sys/ioctl.h>
> +#if defined(__linux__)
>  #include <ifaddrs.h>
>  #include <arpa/inet.h>
>  #include <sys/socket.h>
>  #include <net/if.h>
> +#endif
>  #include <sys/wait.h>
>  #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,

  reply	other threads:[~2012-03-23 18:20 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
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 [this message]
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=20120323152022.1251ed9d@doriath.home \
    --to=lcapitulino@redhat.com \
    --cc=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).