diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-02-26 09:24:04 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-02-26 09:25:13 +0100 |
commit | 8d7cca39dd2c481e4c08d2dd2dc980fee22230ef (patch) | |
tree | 989ae62e8b3a3a6cfb5a8906204d0653e8a5ca88 /i386/i386at/kd_mouse.c | |
parent | fe820bd2e22e5a0b5aa5bd50de3b06759e42af78 (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/kd_mouse.c')
-rw-r--r-- | i386/i386at/kd_mouse.c | 9 |
1 files changed, 8 insertions, 1 deletions
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); |