Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern va_copy list needs va_end; pointed out by kre@
details: https://anonhg.NetBSD.org/src/rev/9648911f8de3
branches: trunk
changeset: 999135:9648911f8de3
user: christos <christos%NetBSD.org@localhost>
date: Tue May 21 04:53:52 2019 +0000
description:
va_copy list needs va_end; pointed out by kre@
diffstat:
sys/kern/subr_prf.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diffs (49 lines):
diff -r 48bce6ab3ce2 -r 9648911f8de3 sys/kern/subr_prf.c
--- a/sys/kern/subr_prf.c Tue May 21 04:10:20 2019 +0000
+++ b/sys/kern/subr_prf.c Tue May 21 04:53:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_prf.c,v 1.178 2019/05/21 00:57:54 kre Exp $ */
+/* $NetBSD: subr_prf.c,v 1.179 2019/05/21 04:53:52 christos Exp $ */
/*-
* Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.178 2019/05/21 00:57:54 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.179 2019/05/21 04:53:52 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -106,6 +106,7 @@
extern struct tty *constty; /* pointer to console "window" tty */
extern int log_open; /* subr_log: is /dev/klog open? */
extern krndsource_t rnd_printf_source;
+extern int config_pending;
const char *panicstr; /* arg to first call to panic (used as a flag
to indicate that panic has already been called). */
struct cpu_info *paniccpu; /* cpu that first paniced */
@@ -866,7 +867,8 @@
if (prefix)
kprintf_internal("%s: ", flags, NULL, NULL, prefix);
- kprintf_internal("autoconfiguration error: ", TOLOG, NULL, NULL);
+ if (config_pending)
+ kprintf_internal("autoconfiguration error: ", TOLOG, NULL, NULL);
kprintf(fmt, flags, NULL, NULL, ap);
kprintf_unlock();
@@ -1189,9 +1191,10 @@
va_list cap;
va_copy(cap, ap);
- retval = kprintf(fmt, TOBUFONLY, NULL, NULL, ap) + 1;
+ retval = kprintf(fmt, TOBUFONLY, NULL, NULL, cap) + 1;
+ va_end(cap);
*bf = kmem_alloc(retval, KM_SLEEP);
- return vsnprintf(*bf, retval, fmt, cap);
+ return vsnprintf(*bf, retval, fmt, ap);
}
/*
Home |
Main Index |
Thread Index |
Old Index