diff options
author | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-07-29 21:13:33 +0000 |
---|---|---|
committer | Alexandre Ratchov <ratchov@cvs.openbsd.org> | 2015-07-29 21:13:33 +0000 |
commit | 17dd93ea98abe4ab1d9af024083f4dc546ffe8a2 (patch) | |
tree | 49e94658b5086c822f850ded956af562557a3546 | |
parent | b7f8c531bdd6eae84181af0170a13e3ddca0edde (diff) |
Fix spacing and be more verbose in printfs under #ifdef AUDIO_DEBUG.
No binary change.
-rw-r--r-- | sys/dev/audio.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c index 192704b7fca..ab458b95c9e 100644 --- a/sys/dev/audio.c +++ b/sys/dev/audio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: audio.c,v 1.137 2015/07/28 21:04:28 ratchov Exp $ */ +/* $OpenBSD: audio.c,v 1.138 2015/07/29 21:13:32 ratchov Exp $ */ /* * Copyright (c) 2015 Alexandre Ratchov <alex@caoua.org> * @@ -223,7 +223,8 @@ audio_buf_rdiscard(struct audio_buf *buf, size_t count) { #ifdef AUDIO_DEBUG if (count > buf->used) { - panic("audio_buf_rdiscard: bad count = %zu\n", count); + panic("audio_buf_rdiscard: bad count = %zu, " + "start = %zu, used = %zu\n", count, buf->start, buf->used); } #endif buf->used -= count; @@ -240,7 +241,8 @@ audio_buf_wcommit(struct audio_buf *buf, size_t count) { #ifdef AUDIO_DEBUG if (count > (buf->len - buf->used)) { - panic("audio_buf_wcommit: bad count = %zu\n", count); + panic("audio_buf_wcommit: bad count = %zu, " + "start = %zu, used = %zu\n", count, buf->start, buf->used); } #endif buf->used += count; @@ -1461,7 +1463,7 @@ audio_write(struct audio_softc *sc, struct uio *uio, int ioflag) */ mtx_enter(&audio_lock); if (uio->uio_resid > 0 && (ioflag & IO_NDELAY)) { - if (sc->play.used == sc->play.len ) { + if (sc->play.used == sc->play.len) { mtx_leave(&audio_lock); return EWOULDBLOCK; } |