Page MenuHomeFreeBSD

D19747.diff
No OneTemporary

D19747.diff

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

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)

Event Timeline