Module Name:    src
Committed By:   thorpej
Date:           Mon Apr  5 00:26:47 UTC 2021

Modified Files:
        src/sys/kern [thorpej-cfargs]: subr_autoconf.c

Log Message:
Document that config_probe() really should just return a bool, but
explain why it cannot, currently.


To generate a diff of this commit:
cvs rdiff -u -r1.277.2.12 -r1.277.2.13 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.277.2.12 src/sys/kern/subr_autoconf.c:1.277.2.13
--- src/sys/kern/subr_autoconf.c:1.277.2.12	Sun Apr  4 19:23:53 2021
+++ src/sys/kern/subr_autoconf.c	Mon Apr  5 00:26:47 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_autoconf.c,v 1.277.2.12 2021/04/04 19:23:53 thorpej Exp $ */
+/* $NetBSD: subr_autoconf.c,v 1.277.2.13 2021/04/05 00:26:47 thorpej 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.277.2.12 2021/04/04 19:23:53 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.277.2.13 2021/04/05 00:26:47 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1031,6 +1031,12 @@ config_probe(device_t parent, cfdata_t c
 	 * This is currently a synonym for config_match(), but this
 	 * is an implementation detail; "match" and "probe" routines
 	 * have different behaviors.
+	 *
+	 * XXX config_probe() should return a bool, because there is
+	 * XXX no match score for probe -- it's either there or it's
+	 * XXX not, but some ports abuse the return value as a way
+	 * XXX to attach "critical" devices before "non-critical"
+	 * XXX devices.
 	 */
 	return config_match(parent, cf, aux);
 }

Reply via email to