提交 e7658fcc 编写于 作者: S Stefan Berger 提交者: Michael S. Tsirkin

tpm: Fix write to file descriptor function

Fix a bug introduced in commit 46f296cd while moving send_all to the
tpm_passthrough code. Fix the name of the variable used in the loop.
Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
Acked-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 52e38eb0
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册