Page MenuHomeFreeBSD

D19747.id56889.diff
No OneTemporary

D19747.id56889.diff

Index: sys/dev/sdhci/sdhci.c
===================================================================
--- sys/dev/sdhci/sdhci.c
+++ 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

Mime Type
text/plain
Expires
Sat, Jul 25, 2:23 AM (10 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35459388
Default Alt Text
D19747.id56889.diff (743 B)

Event Timeline