[libvirt] [PATCH] tpm: Use /dev/null for cancel path if none was found

Marc-André Lureau marcandre.lureau at gmail.com
Thu Sep 7 11:34:09 UTC 2017


Hi

On Thu, Jun 29, 2017 at 7:01 PM Stefan Berger <stefanb at linux.vnet.ibm.com>
wrote:

> 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 at linux.vnet.ibm.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>

---
>  src/util/virtpm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/src/util/virtpm.c b/src/util/virtpm.c
> index 6d9b065..d5c10da 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);
> --
> 2.5.5
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
>
-- 
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170907/84077464/attachment-0001.htm>


More information about the libvir-list mailing list