[libvirt] [PATCH 1/3] only add qemu_tpmdev_opts when CONFIG_TPM is defined

Amos Kong akong at redhat.com
Thu Mar 27 02:38:10 UTC 2014


Signed-off-by: Amos Kong <akong at redhat.com>
---
 vl.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/vl.c b/vl.c
index 2355227..596ecfa 100644
--- a/vl.c
+++ b/vl.c
@@ -449,6 +449,7 @@ static QemuOptsList qemu_object_opts = {
     },
 };
 
+#ifdef CONFIG_TPM
 static QemuOptsList qemu_tpmdev_opts = {
     .name = "tpmdev",
     .implied_opt_name = "type",
@@ -458,6 +459,7 @@ static QemuOptsList qemu_tpmdev_opts = {
         { /* end of list */ }
     },
 };
+#endif
 
 static QemuOptsList qemu_realtime_opts = {
     .name = "realtime",
@@ -2992,7 +2994,9 @@ int main(int argc, char **argv, char **envp)
     qemu_add_opts(&qemu_sandbox_opts);
     qemu_add_opts(&qemu_add_fd_opts);
     qemu_add_opts(&qemu_object_opts);
+#ifdef CONFIG_TPM
     qemu_add_opts(&qemu_tpmdev_opts);
+#endif
     qemu_add_opts(&qemu_realtime_opts);
     qemu_add_opts(&qemu_msg_opts);
     qemu_add_opts(&qemu_name_opts);
-- 
1.8.5.3




More information about the libvir-list mailing list