Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-cfargs]: src/sys/kern Document that config_probe() really should...



details:   https://anonhg.NetBSD.org/src/rev/c0cba35dfc07
branches:  thorpej-cfargs
changeset: 954311:c0cba35dfc07
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Apr 05 00:26:47 2021 +0000

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

diffstat:

 sys/kern/subr_autoconf.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 68add0e6f801 -r c0cba35dfc07 sys/kern/subr_autoconf.c
--- a/sys/kern/subr_autoconf.c  Sun Apr 04 22:01:12 2021 +0000
+++ b/sys/kern/subr_autoconf.c  Mon Apr 05 00:26:47 2021 +0000
@@ -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 @@
         * 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);
 }



Home | Main Index | Thread Index | Old Index