Page MenuHomeFreeBSD

D19747.id55588.diff
No OneTemporary

D19747.id55588.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[MAX_INPUT];
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
Tue, Jul 7, 4:16 AM (7 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34782562
Default Alt Text
D19747.id55588.diff (749 B)

Event Timeline