From b4068fdf5a4f42949bd65b6b0d9f47bf9553766b Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 6 Apr 2011 21:09:14 +0300 Subject: [PATCH] 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 --- 8250-serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/8250-serial.c b/8250-serial.c index 232f6e8..f0aa69e 100644 --- a/8250-serial.c +++ b/8250-serial.c @@ -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;