Module Name: src
Committed By: pgoyette
Date: Fri Jul 15 01:13:10 UTC 2016
Modified Files:
src/sys/kern: subr_autoconf.c
Log Message:
As suggested by christos@, use KASSERTMSG()
To generate a diff of this commit:
cvs rdiff -u -r1.244 -r1.245 src/sys/kern/subr_autoconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/subr_autoconf.c
diff -u src/sys/kern/subr_autoconf.c:1.244 src/sys/kern/subr_autoconf.c:1.245
--- src/sys/kern/subr_autoconf.c:1.244 Thu Jul 14 21:57:06 2016
+++ src/sys/kern/subr_autoconf.c Fri Jul 15 01:13:10 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.244 2016/07/14 21:57:06 pgoyette Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.245 2016/07/15 01:13:10 pgoyette Exp $ */
/*
* Copyright (c) 1996, 2000 Christopher G. Demetriou
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.244 2016/07/14 21:57:06 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.245 2016/07/15 01:13:10 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_ddb.h"
@@ -1370,8 +1370,10 @@ config_devalloc(const device_t parent, c
return NULL;
/* get memory for all device vars */
- KASSERT((ca->ca_flags & DVF_PRIV_ALLOC)
- || ca->ca_devsize >= sizeof(struct device));
+ KASSERTMSG((ca->ca_flags & DVF_PRIV_ALLOC)
+ || ca->ca_devsize >= sizeof(struct device),
+ "config_devalloc: %s (%zu < %zu)", cf->cf_atname, ca->ca_devsize,
+ sizeof(struct device));
if (ca->ca_devsize > 0) {
dev_private = kmem_zalloc(ca->ca_devsize, KM_SLEEP);
if (dev_private == NULL)