summaryrefslogtreecommitdiff
path: root/i386/i386at
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-26 09:24:04 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-02-26 09:25:13 +0100
commit8d7cca39dd2c481e4c08d2dd2dc980fee22230ef (patch)
tree989ae62e8b3a3a6cfb5a8906204d0653e8a5ca88 /i386/i386at
parentfe820bd2e22e5a0b5aa5bd50de3b06759e42af78 (diff)
Limit printing "queue full" messages
* i386/i386at/kd_event.c (kbd_enqueue): Print "queue full" warning only once. * i386/i386at/kd_mouse.c (mouse_enqueue): Likewise.
Diffstat (limited to 'i386/i386at')
-rw-r--r--i386/i386at/kd_event.c9
-rw-r--r--i386/i386at/kd_mouse.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/i386/i386at/kd_event.c b/i386/i386at/kd_event.c
index b60118e..53dade7 100644
--- a/i386/i386at/kd_event.c
+++ b/i386/i386at/kd_event.c
@@ -293,7 +293,14 @@ void
kbd_enqueue(kd_event *ev)
{
if (kdq_full(&kbd_queue))
- printf("kbd: queue full\n");
+ {
+ static int warned;
+ if (!warned)
+ {
+ printf("kbd: queue full\n");
+ warned = 1;
+ }
+ }
else
kdq_put(&kbd_queue, ev);
diff --git a/i386/i386at/kd_mouse.c b/i386/i386at/kd_mouse.c
index 16241ef..50a3683 100644
--- a/i386/i386at/kd_mouse.c
+++ b/i386/i386at/kd_mouse.c
@@ -789,7 +789,14 @@ void
mouse_enqueue(kd_event *ev)
{
if (kdq_full(&mouse_queue))
- printf("mouse: queue full\n");
+ {
+ static int warned;
+ if (!warned)
+ {
+ printf("mouse: queue full\n");
+ warned = 1;
+ }
+ }
else
kdq_put(&mouse_queue, ev);