mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-09-06 21:51:49 +00:00
kvm tools: Use STDIN_FILENO instead of fileno(stdin)
To cleanup the serial console emulation code, use STDIN_FILENO which is POSIX API instead of fileno(stdin) which is libc API. Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
committed by
Will Deacon
parent
97a2dda645
commit
b4068fdf5a
+2
-2
@@ -80,10 +80,10 @@ static void serial8250__receive(struct kvm *self, struct serial8250_device *dev)
|
||||
if (dev->lsr & UART_LSR_DR)
|
||||
return;
|
||||
|
||||
if (!is_readable(fileno(stdin)))
|
||||
if (!is_readable(STDIN_FILENO))
|
||||
return;
|
||||
|
||||
c = read_char(fileno(stdin));
|
||||
c = read_char(STDIN_FILENO);
|
||||
if (c < 0)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user