From 7f5e12352198252c84beb07980a94531f24f5a88 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 --- tools/kvm/8250-serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/8250-serial.c b/tools/kvm/8250-serial.c index 232f6e86eb8c..f0aa69e132c7 100644 --- a/tools/kvm/8250-serial.c +++ b/tools/kvm/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; -- 2.39.5