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:
Pekka Enberg
2015-06-01 16:39:41 +01:00
committed by Will Deacon
parent 97a2dda645
commit b4068fdf5a
+2 -2
View File
@@ -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;