]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve sdhci slot_printf() debug printing.
authorBjoern A. Zeeb <bz@FreeBSD.org>
Sat, 8 Jun 2019 15:24:03 +0000 (15:24 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Sat, 8 Jun 2019 15:24:03 +0000 (15:24 +0000)
commit27d72fe14ad9302b1c95797d37c88f920e9226d5
tree97cd1bf405d690e75c26156d7538b56048cd8230
parent6e40542a4ee53e7c515b6f4c1e382871daaf4782
Improve sdhci slot_printf() debug printing.

Currently slot_printf() uses two printf() calls to print the
device-slot name, and actual message. When other printf()s are
ongoing in parallel this can lead to interleaved message on the console,
which is especially unhelpful for debugging or error messages.

Take a hit on the stack and vsnprintf() the message to the buffer.
This way it can be printed along with the device-slot name in one go
avoiding console gibberish.

Reviewed by: marius
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19747
sys/dev/sdhci/sdhci.c