diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-11-03 18:10:01 -0400 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2017-12-14 23:39:15 -0500 |
commit | b21e6aaf4a1e25c22a603e22ef96b3a31d3013aa (patch) | |
tree | f7d9e09aefd608d3edaead9fb13b58162163571e /backends/tpm.c | |
parent | d3fd953f06700ebe2d15825d4399f7cd3e31af34 (diff) | |
download | qemu-b21e6aaf4a1e25c22a603e22ef96b3a31d3013aa.zip qemu-b21e6aaf4a1e25c22a603e22ef96b3a31d3013aa.tar.gz qemu-b21e6aaf4a1e25c22a603e22ef96b3a31d3013aa.tar.bz2 |
tpm: Move getting TPM buffer size to backends
Rather than setting the size of the TPM buffer in the front-end,
query the backend for the size of the buffer. In this patch we
just move the hard-coded buffer size of 4096 to the backends.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'backends/tpm.c')
-rw-r--r-- | backends/tpm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/tpm.c b/backends/tpm.c index 7777467..cb49185 100644 --- a/backends/tpm.c +++ b/backends/tpm.c @@ -139,6 +139,13 @@ TPMVersion tpm_backend_get_tpm_version(TPMBackend *s) return k->get_tpm_version(s); } +size_t tpm_backend_get_buffer_size(TPMBackend *s) +{ + TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s); + + return k->get_buffer_size(s); +} + TPMInfo *tpm_backend_query_tpm(TPMBackend *s) { TPMInfo *info = g_new0(TPMInfo, 1); |