diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-03-20 02:26:35 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2012-03-20 02:26:35 +0100 |
commit | 0410dd9e3fe657ef3d8334394180eac5956d407d (patch) | |
tree | b3bbcec0436ffd11df122182229b2f3ad3ad1892 | |
parent | 3799f797d1c8f440bd83c11db3d76a9fb93b6fdb (diff) |
Complain about Xen console smash only once at a time
* xen/console.c (hypputc): Warning only once per console write about console
ring smash.
-rw-r--r-- | xen/console.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xen/console.c b/xen/console.c index ed72d1a..cb61d45 100644 --- a/xen/console.c +++ b/xen/console.c @@ -47,9 +47,13 @@ int hypputc(int c) hyp_console_io(CONSOLEIO_write, 1, kvtolin(&d)); } else { spl_t spl = splhigh(); + int complain; simple_lock(&outlock); while (hyp_ring_smash(console->out, console->out_prod, console->out_cons)) { - hyp_console_put("ring smash\n"); + if (!complain) { + complain = 1; + hyp_console_put("ring smash\n"); + } /* TODO: are we allowed to sleep in putc? */ hyp_yield(); } |