[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux |
Date: |
Tue, 20 Mar 2012 19:54:09 -0500 |
This currently breaks the build for BSDs.
Signed-off-by: Michael Roth <address@hidden>
---
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
+#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__)
static GuestNetworkInterfaceList *
guest_find_interface(GuestNetworkInterfaceList *head,
--
1.7.4.1
- [Qemu-devel] [PATCH] qemu-ga: Make guest-network-get-interfaces Linux only, Michal Privoznik, 2012/03/20
- [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux,
Michael Roth <=
- Re: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux, Luiz Capitulino, 2012/03/23
- Re: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux, Michael Roth, 2012/03/23
- Re: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux, Luiz Capitulino, 2012/03/23
- [Qemu-devel] [PATCH] qemu-ga: fix bsd build, and re-org linux-specific implementations, Michael Roth, 2012/03/25
- Re: [Qemu-devel] [PATCH] qemu-ga: fix bsd build, and re-org linux-specific implementations, Luiz Capitulino, 2012/03/26
- Re: [Qemu-devel] [PATCH] qemu-ga: fix bsd build, and re-org linux-specific implementations, Brad Smith, 2012/03/26