Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197870
b: refs/heads/master
c: 60caacd
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed May 19, 2010
1 parent 8ba8c8b commit eaf53a9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 1d05160be743c506b1d6926e7c637496fa750cd3
refs/heads/master: 60caacd3eeab68672961e88db01e26735527d521
6 changes: 3 additions & 3 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count,
}

/* The condition that must be true for polling to end */
static bool wait_is_over(struct port *port)
static bool will_read_block(struct port *port)
{
return port_has_data(port) || !port->host_connected;
return !port_has_data(port) && port->host_connected;
}

static ssize_t port_fops_read(struct file *filp, char __user *ubuf,
Expand All @@ -504,7 +504,7 @@ static ssize_t port_fops_read(struct file *filp, char __user *ubuf,
return -EAGAIN;

ret = wait_event_interruptible(port->waitqueue,
wait_is_over(port));
!will_read_block(port));
if (ret < 0)
return ret;
}
Expand Down

0 comments on commit eaf53a9

Please sign in to comment.