qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] Fix compile with --disable-tpm


From: BALATON Zoltan
Subject: [Qemu-devel] [PATCH] Fix compile with --disable-tpm
Date: Mon, 23 Oct 2017 12:24:59 +0200

Signed-off-by: BALATON Zoltan <address@hidden>
---
 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();
-- 
2.7.6




reply via email to

[Prev in Thread] Current Thread [Next in Thread]