diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-03 17:54:29 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-03 17:54:29 -0400 |
commit | a9965cb3292782f2072141c12d609de0871d1c7c (patch) | |
tree | fc4d1297cecfe578f15eeb3be17d2076030a0eec /sys/kern/driver_subr.c | |
parent | 8378d14cc0f4996080e21c84491ba9b8fcb679a4 (diff) |
kernel: driver: Implement driver blacklist
Sometimes one may not want *all* of the drivers to start up during
system boot. The driver blacklist allows one to mark a driver to be
ignored during startup.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/kern/driver_subr.c')
-rw-r--r-- | sys/kern/driver_subr.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/kern/driver_subr.c b/sys/kern/driver_subr.c index b53463a..a0f9f73 100644 --- a/sys/kern/driver_subr.c +++ b/sys/kern/driver_subr.c @@ -55,6 +55,16 @@ __driver_init_td(void) for (dp = (void *)start; (uintptr_t)dp < end; ++dp) { var = dp->data; + + /* + * Check the blacklist to see if this driver + * is marked to be ignored. If so, just continue + * to the next. + */ + if (driver_blacklist_check(dp->name)) { + continue; + } + if (var->deferred) { dp->init(); var->deferred = 0; |