tech-kern archive

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

Re: Rump makes the kernel problematically brittle



> Perhaps.   I'd actually like to see the diff for this (related) one ...

> usr/src/sys/kern/subr_autoconf.c
> 	Include "opt_autoconf.h" and implement NO_DETACH_MESSAGES, to
> 	suppress device-detached console spammage on shutdown.

> as that's clearly where the problem occurs.

Here you are.  But see below, too.

diff --git a/usr/src/sys/kern/subr_autoconf.c b/usr/src/sys/kern/subr_autoconf.c
index b9aa7c8..05f6dac 100644
--- a/usr/src/sys/kern/subr_autoconf.c
+++ b/usr/src/sys/kern/subr_autoconf.c
@@ -83,6 +83,7 @@ __KERNEL_RCSID(0, "$NetBSD: subr_autoconf.c,v 1.253 2017/06/01 02:45:13 chs Exp
 #include "opt_ddb.h"
 #include "drvctl.h"
 #endif
+#include "opt_autoconf.h"
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -1812,8 +1813,10 @@ config_detach(device_t dev, int flags)
 		}
 	}
 
+#ifndef NO_DETACH_MESSAGES
 	if (dev->dv_cfdata != NULL && (flags & DETACH_QUIET) == 0)
 		aprint_normal_dev(dev, "detached\n");
+#endif
 
 out:
 	config_alldevs_enter(&af);

> Rump doesn't do kernel options the wame way the kernel does, and care
> needs to be taken when adding op_*.h includes as those files won't
> generally exist in the rump universe.

Yes, I got a very nice and helpful off-list mail (thank you!) saying,
approximately, that I needed to have the #include of opt_autoconf.h
inside the _KERNEL_OPT conditional.  I've now moved it and have a build
running.  Hasn't failed so far, but it hasn't been long enough for that
to mean much yet.

Is this documented anywhere?

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index