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>
This commit is contained in:
parent
52e38eb051
commit
e7658fcc4c
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user