summaryrefslogtreecommitdiffstats
path: root/hw/tpm/tpm_passthrough.c
diff options
context:
space:
mode:
authorStefan Berger <stefanb@us.ibm.com>2016-04-05 20:21:50 -0400
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 20:03:49 -0600
commit786316744e254b584fed0c939e37a0ff0d9f4a28 (patch)
tree6e76600397a83dba60149aca3e5c4b0bf4f24953 /hw/tpm/tpm_passthrough.c
parenta95b63714d4d7578a77f0b92a3bfb05e54a9bd8c (diff)
downloadhqemu-786316744e254b584fed0c939e37a0ff0d9f4a28.zip
hqemu-786316744e254b584fed0c939e37a0ff0d9f4a28.tar.gz
tpm: Fix write to file descriptor function
Fix a bug introduced in commit 46f296c while moving send_all to the tpm_passthrough code. Fix the name of the variable used in the loop. Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/tpm/tpm_passthrough.c')
-rw-r--r--hw/tpm/tpm_passthrough.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index e98efb7..e88c0d2 100644
--- a/hw/tpm/tpm_passthrough.c
+++ b/hw/tpm/tpm_passthrough.c
@@ -86,7 +86,7 @@ static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len)
int ret, remain;
remain = len;
- while (len > 0) {
+ while (remain > 0) {
ret = write(fd, buf, remain);
if (ret < 0) {
if (errno != EINTR && errno != EAGAIN) {
OpenPOWER on IntegriCloud