loader question

Sascha Wildner saw at online.de
Sun May 16 14:44:29 PDT 2004

Matthew Dillon wrote:

:If a module is loaded via a
:statement in /boot/loader.conf, will this result in the module's event 
:handler function being called with a MOD_LOAD argument as described in 

    It should be, yes.

consider the attached patch. I apply it and put


into my /boot/loader.conf. With verbose_loading="YES" I can see that the 
loader loads the vesa module but if I do a 'boot -d' then and drop into 
remote gdb I'd expect my variable vesaModEvent to be 1. But it's still 0.

--- /usr/src/sys/dev/video/i386/vesa/vesa.c	2003-09-08 20:36:04.000000000 +0200
+++ /usr/s/src/sys/dev/video/i386/vesa/vesa.c	2004-05-16 23:31:58.000000000 +0200
@@ -205,6 +205,8 @@
 static int vesa_get_origin(video_adapter_t *adp, off_t *offset);
+static int vesaModEvent;
 static void
 dump_buffer(u_char *buf, size_t len)
@@ -1619,6 +1621,7 @@
 static int
 vesa_mod_event(module_t mod, int type, void *data)
+	vesaModEvent++;
 	switch (type) {
 	case MOD_LOAD:
 		return vesa_load();

More information about the Kernel mailing list