Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144691734
D19747.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
758 B
Referenced Files
None
Subscribers
None
D19747.diff
View Options
Index: head/sys/dev/sdhci/sdhci.c
===================================================================
--- head/sys/dev/sdhci/sdhci.c
+++ head/sys/dev/sdhci/sdhci.c
@@ -185,15 +185,20 @@
static int
slot_printf(const struct sdhci_slot *slot, const char * fmt, ...)
{
+ char buf[128];
va_list ap;
int retval;
- retval = printf("%s-slot%d: ",
- device_get_nameunit(slot->bus), slot->num);
-
+ /*
+ * Make sure we print a single line all together rather than in two
+ * halves to avoid console gibberish bingo.
+ */
va_start(ap, fmt);
- retval += vprintf(fmt, ap);
+ retval = vsnprintf(buf, sizeof(buf), fmt, ap);
va_end(ap);
+
+ retval += printf("%s-slot%d: %s",
+ device_get_nameunit(slot->bus), slot->num, buf);
return (retval);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 12, 5:18 AM (16 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28664176
Default Alt Text
D19747.diff (758 B)
Attached To
Mode
D19747: Improve sdhci slot_printf() debug printing.
Attached
Detach File
Event Timeline
Log In to Comment