Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197864
b: refs/heads/master
c: 6dc69f9
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed May 19, 2010
1 parent d25aef1 commit 2f2b4db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: eaeff9608a8cf43a676b6f4b6235ea9d76192230
refs/heads/master: 6dc69f970231387d8fe646a831920da26408b5f5
8 changes: 6 additions & 2 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ static int put_chars(u32 vtermno, const char *buf, int count)

port = find_port_by_vtermno(vtermno);
if (!port)
return 0;
return -EPIPE;

return send_buf(port, (void *)buf, count);
}
Expand All @@ -669,9 +669,13 @@ static int get_chars(u32 vtermno, char *buf, int count)
{
struct port *port;

/* If we've not set up the port yet, we have no input to give. */
if (unlikely(early_put_chars))
return 0;

port = find_port_by_vtermno(vtermno);
if (!port)
return 0;
return -EPIPE;

/* If we don't have an input queue yet, we can't get input. */
BUG_ON(!port->in_vq);
Expand Down

0 comments on commit 2f2b4db

Please sign in to comment.