qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] copy&paste error in serial.c causes a crash when attempting to read from UART (if there is no data to be read)
@ 2013-06-17  0:43 Vladimir Senkov
  2013-06-17  0:57 ` Andreas Färber
  2013-06-17  7:33 ` Peter Crosthwaite
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Senkov @ 2013-06-17  0:43 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

>From 032bdc94c6369aa7b578182cdad8038ebb2b8cd1 Mon Sep 17 00:00:00 2001
From: Vladimir Senkov <hangup@gmail.com>
Date: Sun, 16 Jun 2013 20:30:52 -0400
Subject: [PATCH] fixed a copy&paste error in serial.c

Signed-off-by: Vladimir Senkov <hangup@gmail.com>

---
 hw/char/serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/char/serial.c b/hw/char/serial.c
index b537e42..6382f98 100644
--- a/hw/char/serial.c
+++ b/hw/char/serial.c
@@ -424,7 +424,7 @@ static uint64_t serial_ioport_read(void *opaque, hwaddr
addr, unsigned size)
             ret = s->divider & 0xff;
         } else {
             if(s->fcr & UART_FCR_FE) {
-                ret = fifo8_is_full(&s->recv_fifo) ?
+                ret = fifo8_is_empty(&s->recv_fifo) ?
                             0 : fifo8_pop(&s->recv_fifo);
                 if (s->recv_fifo.num == 0) {
                     s->lsr &= ~(UART_LSR_DR | UART_LSR_BI);
--
1.8.1.2

[-- Attachment #2: Type: text/html, Size: 1373 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-06-17  7:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17  0:43 [Qemu-devel] copy&paste error in serial.c causes a crash when attempting to read from UART (if there is no data to be read) Vladimir Senkov
2013-06-17  0:57 ` Andreas Färber
2013-06-17  7:03   ` Paolo Bonzini
2013-06-17  7:16     ` Andreas Färber
2013-06-17  7:31       ` Peter Crosthwaite
2013-06-17  7:30   ` Peter Crosthwaite
2013-06-17  7:33 ` Peter Crosthwaite

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).