qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V19 7/7] Add fd parameter for TPM passthrough dr


From: Stefan Berger
Subject: Re: [Qemu-devel] [PATCH V19 7/7] Add fd parameter for TPM passthrough driver
Date: Wed, 24 Oct 2012 15:06:57 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

On 10/03/2012 02:46 PM, Corey Bryant wrote:


On 06/04/2012 03:37 PM, Stefan Berger wrote:
@@ -201,6 +201,10 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv)
          res->path = g_strdup(drv->path);
          res->has_path = true;
      }
+    if (drv->tpm_fd != NULL && *drv->tpm_fd >= 0) {
+        res->fd = *drv->tpm_fd;
+        res->has_fd = true;
+    }

Is an else path needed to set res->has_fd = false if there's no tpm_fd?


res is allocated using g_new0, so all fields are set to 0. With that has_fd is also set to false.

Regards,
   Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]