diff options
author | Stefan Berger <stefanb@linux.ibm.com> | 2021-06-15 16:21:20 +0200 |
---|---|---|
committer | Stefan Berger <stefanb@linux.ibm.com> | 2021-06-15 10:55:12 -0400 |
commit | e542b71805dc4b7827e6c2f00a1170a61843345e (patch) | |
tree | 9f6a94e89b180e80e6822f2b410b825b46ff1bf0 /include/sysemu/tpm.h | |
parent | 295f7dcb609e02d8902180e48ffa590bea531d7e (diff) |
sysemu: Make TPM structures inaccessible if CONFIG_TPM is not defined
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210614191335.1968807-5-stefanb@linux.ibm.com>
[PMD: Remove tpm_init() / tpm_cleanup() stubs]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'include/sysemu/tpm.h')
-rw-r--r-- | include/sysemu/tpm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index 1a85564e47..68b2206463 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -15,6 +15,8 @@ #include "qapi/qapi-types-tpm.h" #include "qom/object.h" +#ifdef CONFIG_TPM + int tpm_config_parse(QemuOptsList *opts_list, const char *optarg); int tpm_init(void); void tpm_cleanup(void); @@ -73,4 +75,11 @@ static inline TPMVersion tpm_get_version(TPMIf *ti) return TPM_IF_GET_CLASS(ti)->get_version(ti); } +#else /* CONFIG_TPM */ + +#define tpm_init() (0) +#define tpm_cleanup() + +#endif /* CONFIG_TPM */ + #endif /* QEMU_TPM_H */ |