]> xenbits.xensource.com Git - libvirt.git/commitdiff
tpm: Use /dev/null for cancel path if none was found
authorStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 29 Jun 2017 18:01:11 +0000 (14:01 -0400)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 7 Sep 2017 12:00:46 +0000 (14:00 +0200)
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 <stefanb@linux.vnet.ibm.com>
Tested-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
src/util/virtpm.c

index 6d9b0657a66a00d513d59a0e0ecfa6b27d959d90..d5c10da382e4e629c146a6dcc79f0b33201c52b0 100644 (file)
@@ -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);