From patchwork Wed Mar 21 00:54:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 147888 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C43E8B6F73 for ; Wed, 21 Mar 2012 11:54:33 +1100 (EST) Received: from localhost ([::1]:35516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA9ot-0000Jw-0y for incoming@patchwork.ozlabs.org; Tue, 20 Mar 2012 20:54:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:56392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA9om-0000Iz-63 for qemu-devel@nongnu.org; Tue, 20 Mar 2012 20:54:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SA9ok-0008Py-HW for qemu-devel@nongnu.org; Tue, 20 Mar 2012 20:54:23 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:50878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SA9ok-0008Pb-Ab for qemu-devel@nongnu.org; Tue, 20 Mar 2012 20:54:22 -0400 Received: by ggnj2 with SMTP id j2so715864ggn.4 for ; Tue, 20 Mar 2012 17:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=K/0+IyPrdGD2t5elddG59D14JoPVFlYuVVmINSo/yMY=; b=rG/6bjCiWPNeBozH/xaRzW1fdr0bmyHX4zBDQoRy32UuwSBlNMeRrM/misBcO0RxrO /gpiP2KZq79q3nT4p2BdoZotxFHeBlXtmTFadFLMCEZ+YdHK8bPkc265TviQFYfd/rU4 To1qHIHXac59Ak+2SvUkuGpatLgC8/08T+4cUgvDCnnuHBoEe9nG5/OzJ449ASIuzKz8 7nR/iMlDP696NMfwqgzzvprAYAFKOweepR1ifF3p9XlJg4dW/N9AM0Qb+7G5b20BgD59 zFFOfrpY4/PuS92NK/qI7IjBV9GpxIuHSc4G3dBPcomxf0qxLcXbD6B0KTj/hdb7u9aG 01cw== Received: by 10.60.14.36 with SMTP id m4mr2421755oec.37.1332291260409; Tue, 20 Mar 2012 17:54:20 -0700 (PDT) Received: from localhost.localdomain ([32.97.110.59]) by mx.google.com with ESMTPS id b3sm116571obp.6.2012.03.20.17.54.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Mar 2012 17:54:19 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Tue, 20 Mar 2012 19:54:09 -0500 Message-Id: <1332291249-18212-1-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com> References: <0ccd5fa1764f254dbde6851c0d2139e9198a25e2.1332256180.git.mprivozn@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.161.173 Cc: mprivozn@redhat.com Subject: [Qemu-devel] [PATCH] qemu-ga: stub out guest-suspend* for non-linux X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This currently breaks the build for BSDs. Signed-off-by: Michael Roth --- 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 #include +#if defined(__linux__) #include #include #include #include +#endif #include #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,