Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189638
b: refs/heads/master
c: 9ff4cfa
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Apr 8, 2010
1 parent b45459f commit f743cfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 162a689a13ed61c0752726edb75427b2cd4186c1
refs/heads/master: 9ff4cfab82d27e9fda72315f911bbaa9516e04bc
10 changes: 3 additions & 7 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,20 +416,16 @@ static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count)
out_vq->vq_ops->kick(out_vq);

if (ret < 0) {
len = 0;
in_count = 0;
goto fail;
}

/*
* Wait till the host acknowledges it pushed out the data we
* sent. Also ensure we return to userspace the number of
* bytes that were successfully consumed by the host.
*/
/* Wait till the host acknowledges it pushed out the data we sent. */
while (!out_vq->vq_ops->get_buf(out_vq, &len))
cpu_relax();
fail:
/* We're expected to return the amount of data we wrote */
return len;
return in_count;
}

/*
Expand Down

0 comments on commit f743cfd

Please sign in to comment.