All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-ga: Make guest-network-get-interfaces Linux only
@ 2012-03-20 15:09 Michal Privoznik
  2012-03-20 16:10 ` Michael Roth
  2012-03-21  0:54 ` [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux Michael Roth
  0 siblings, 2 replies; 14+ messages in thread
From: Michal Privoznik @ 2012-03-20 15:09 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-03-26 20:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.