[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 6/6] ps2: output warning when event queue full
From: |
Amos Kong |
Subject: |
[Qemu-devel] [PATCH v4 6/6] ps2: output warning when event queue full |
Date: |
Thu, 5 Jul 2012 20:48:45 +0800 |
Event would be ignored if ps2 queue is full, this patch
added a warning in ignore path.
Signed-off-by: Amos Kong <address@hidden>
---
hw/ps2.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/hw/ps2.c b/hw/ps2.c
index f93cd24..799c36b 100644
--- a/hw/ps2.c
+++ b/hw/ps2.c
@@ -137,8 +137,10 @@ void ps2_queue(void *opaque, int b)
PS2State *s = (PS2State *)opaque;
PS2Queue *q = &s->queue;
- if (q->count >= PS2_QUEUE_SIZE)
+ if (q->count >= PS2_QUEUE_SIZE) {
+ fprintf(stderr, "ps2: warning: event queue full\n");
return;
+ }
q->data[q->wptr] = b;
if (++q->wptr == PS2_QUEUE_SIZE)
q->wptr = 0;
--
1.7.1
- [Qemu-devel] [PATCH v4 0/6] convert sendkey to qapi, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 1/6] fix doc of using raw values with sendkey, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 3/6] hmp: rename arguments, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 2/6] monitor: rename keyname '<' to 'less', Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 4/6] qapi: generate list struct and visit_list for enum, Amos Kong, 2012/07/05
- [Qemu-devel] [PATCH v4 6/6] ps2: output warning when event queue full,
Amos Kong <=
- [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Amos Kong, 2012/07/05
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Amos Kong, 2012/07/25
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Luiz Capitulino, 2012/07/25
- Re: [Qemu-devel] [PATCH v4 5/6] qapi: convert sendkey, Amos Kong, 2012/07/25