mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-04 04:31:27 +00:00
8250-serial: Simplify is_readable function
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
committed by
Will Deacon
parent
176db3d6c9
commit
6d54df7482
+4
-8
@@ -92,16 +92,12 @@ static int read_char(int fd)
|
||||
|
||||
static bool is_readable(int fd)
|
||||
{
|
||||
struct pollfd pollfd;
|
||||
int err;
|
||||
|
||||
pollfd = (struct pollfd) {
|
||||
.fd = fd,
|
||||
.events = POLLIN,
|
||||
struct pollfd pollfd = (struct pollfd) {
|
||||
.fd = fd,
|
||||
.events = POLLIN,
|
||||
};
|
||||
|
||||
err = poll(&pollfd, 1, 0);
|
||||
return err > 0;
|
||||
return poll(&pollfd, 1, 0) > 0;
|
||||
}
|
||||
|
||||
void serial8250__interrupt(struct kvm *self)
|
||||
|
||||
Reference in New Issue
Block a user