aboutsummaryrefslogtreecommitdiff
path: root/tpm
diff options
context:
space:
mode:
authorCorey Bryant <coreyb@linux.vnet.ibm.com>2013-03-20 12:34:48 -0400
committerLuiz Capitulino <lcapitulino@redhat.com>2013-03-25 16:21:33 -0400
commit88ca7bcff1806594c80782ad19ba50db47086b23 (patch)
tree0ed51b58394a963d5630f2ed2cbeba1906272a20 /tpm
parentdcadaa9b40d6019ac18d6fd7763d43048ef79218 (diff)
QMP: Remove duplicate TPM type from query-tpm
Signed-off-by: Corey Bryant <coreyb@linux.vnet.ibm.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'tpm')
-rw-r--r--tpm/tpm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tpm/tpm.c b/tpm/tpm.c
index ffd24956d7..ae00eae618 100644
--- a/tpm/tpm.c
+++ b/tpm/tpm.c
@@ -257,14 +257,13 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
res->id = g_strdup(drv->id);
res->model = drv->fe_model;
- res->type = drv->ops->type;
- res->tpm_options = g_new0(TpmTypeOptions, 1);
+ res->options = g_new0(TpmTypeOptions, 1);
- switch (res->type) {
+ switch (drv->ops->type) {
case TPM_TYPE_PASSTHROUGH:
- res->tpm_options->kind = TPM_TYPE_OPTIONS_KIND_TPM_PASSTHROUGH_OPTIONS;
+ res->options->kind = TPM_TYPE_OPTIONS_KIND_PASSTHROUGH;
tpo = g_new0(TPMPassthroughOptions, 1);
- res->tpm_options->tpm_passthrough_options = tpo;
+ res->options->passthrough = tpo;
if (drv->path) {
tpo->path = g_strdup(drv->path);
tpo->has_path = true;