summary refs log tree commit diff stats
path: root/stubs/tpm.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-10-24 09:20:43 -0300
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-10-25 01:05:04 -0400
commitc39f95dc2d8d2faf6e4bc24cc489efb5b20c058c (patch)
tree419b5098b2197ca53adb504ecf8fbcac30bef7e1 /stubs/tpm.c
parent6b287efecf474f66d69a8c2032ffb9bda7313944 (diff)
downloadfocaccia-qemu-c39f95dc2d8d2faf6e4bc24cc489efb5b20c058c.tar.gz
focaccia-qemu-c39f95dc2d8d2faf6e4bc24cc489efb5b20c058c.zip
tpm: add stubs
Commit c37cacabf22 moved tpm_cleanup() in the main loop exit, however this
function is not available when compiling with --disable-tpm.

Provides necessary stubs to keep code clean of #ifdef'fery.

Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id: <20171023102903.256AF7456A0@zero.eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Richard W.M. Jones <rjones@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'stubs/tpm.c')
-rw-r--r--stubs/tpm.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/stubs/tpm.c b/stubs/tpm.c
new file mode 100644
index 0000000000..c18aac1c73
--- /dev/null
+++ b/stubs/tpm.c
@@ -0,0 +1,33 @@
+/*
+ * TPM stubs
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+#include "qemu/osdep.h"
+#include "sysemu/tpm.h"
+#include "qmp-commands.h"
+
+int tpm_init(void)
+{
+    return 0;
+}
+
+void tpm_cleanup(void)
+{
+}
+
+TPMInfoList *qmp_query_tpm(Error **errp)
+{
+    return NULL;
+}
+
+TpmTypeList *qmp_query_tpm_types(Error **errp)
+{
+    return NULL;
+}
+
+TpmModelList *qmp_query_tpm_models(Error **errp)
+{
+    return NULL;
+}