From patchwork Mon Oct 23 10:24:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 10022311 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 750B360245 for ; Mon, 23 Oct 2017 10:29:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 65E0328458 for ; Mon, 23 Oct 2017 10:29:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AFF32882B; Mon, 23 Oct 2017 10:29:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6990A28458 for ; Mon, 23 Oct 2017 10:29:50 +0000 (UTC) Received: from localhost ([::1]:37900 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6ZzR-0000MN-Me for patchwork-qemu-devel@patchwork.kernel.org; Mon, 23 Oct 2017 06:29:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6Zyu-0000M5-2p for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:29:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Zyq-0005Tp-37 for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:29:16 -0400 Received: from zero.eik.bme.hu ([152.66.115.2]:13316) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e6Zyp-0005Sh-SQ for qemu-devel@nongnu.org; Mon, 23 Oct 2017 06:29:12 -0400 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id C8F6A7456A5; Mon, 23 Oct 2017 12:29:03 +0200 (CEST) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 256AF7456A0; Mon, 23 Oct 2017 12:29:03 +0200 (CEST) From: BALATON Zoltan Date: Mon, 23 Oct 2017 12:24:59 +0200 To: qemu-devel@nongnu.org Message-Id: <20171023102903.256AF7456A0@zero.eik.bme.hu> X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH] Fix compile with --disable-tpm X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Stefan Berger Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: BALATON Zoltan --- tpm.c | 7 ++++--- vl.c | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tpm.c b/tpm.c index 45520f5..b625cd4 100644 --- a/tpm.c +++ b/tpm.c @@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model) tpm_models[model] = true; } -#ifdef CONFIG_TPM - static const TPMBackendClass * tpm_be_find_by_type(enum TpmType type) { @@ -48,6 +46,8 @@ tpm_be_find_by_type(enum TpmType type) return TPM_BACKEND_CLASS(oc); } +#ifdef CONFIG_TPM + /* * Walk the list of available TPM backend drivers and display them on the * screen. @@ -208,8 +208,9 @@ TPMInfoList *qmp_query_tpm(Error **errp) continue; } info = g_new0(TPMInfoList, 1); +#ifdef CONFIG_TPM info->value = tpm_backend_query_tpm(drv); - +#endif if (!cur_item) { head = cur_item = info; } else { diff --git a/vl.c b/vl.c index 0723835..dbfd06d 100644 --- a/vl.c +++ b/vl.c @@ -4905,7 +4905,9 @@ int main(int argc, char **argv, char **envp) res_free(); /* vhost-user must be cleaned up before chardevs. */ +#ifdef CONFIG_TPM tpm_cleanup(); +#endif net_cleanup(); audio_cleanup(); monitor_cleanup();