From: Stefan Berger Date: Thu, 29 Jun 2017 18:01:11 +0000 (-0400) Subject: tpm: Use /dev/null for cancel path if none was found X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dfbb15b75433e520fb1b905c1c3e28753e53e4a5;p=libvirt.git tpm: Use /dev/null for cancel path if none was found TPM 2 does not implement sysfs files for cancellation of commands. We therefore use /dev/null for the cancel path passed to QEMU. Signed-off-by: Stefan Berger Tested-by: Javier Martinez Canillas Reviewed-by: Marc-André Lureau Signed-off-by: Jiri Denemark --- diff --git a/src/util/virtpm.c b/src/util/virtpm.c index 6d9b0657a6..d5c10da382 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -61,9 +61,7 @@ virTPMCreateCancelPath(const char *devpath) VIR_FREE(path); } if (!path) - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("No usable sysfs TPM cancel file could be " - "found")); + ignore_value(VIR_STRDUP(path, "/dev/null")); } else { virReportError(VIR_ERR_INTERNAL_ERROR, _("TPM device path %s is invalid"), devpath);