aboutsummaryrefslogtreecommitdiff
path: root/tpm.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-11-06 19:39:09 +0100
committerStefan Berger <stefanb@linux.vnet.ibm.com>2017-12-14 23:39:14 -0500
commit9f7c0ef2ffa02b3bf6bc630496b8df67c750edd3 (patch)
tree4f0e33016f740c60277132c4cb73e31b8970a2aa /tpm.c
parent803de211aa1447585b91354aa2ae8dddd4ff68e0 (diff)
tpm-backend: move set 'id' to common code
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Diffstat (limited to 'tpm.c')
-rw-r--r--tpm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tpm.c b/tpm.c
index 32d398aadf..520f449234 100644
--- a/tpm.c
+++ b/tpm.c
@@ -127,11 +127,12 @@ static int tpm_init_tpmdev(void *dummy, QemuOpts *opts, Error **errp)
return 1;
}
- drv = be->create(opts, id);
+ drv = be->create(opts);
if (!drv) {
return 1;
}
+ drv->id = g_strdup(id);
QLIST_INSERT_HEAD(&tpm_backends, drv, list);
return 0;