DragonFly BSD
DragonFly kernel List (threaded) for 2004-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: loader question


From: Sascha Wildner <saw@xxxxxxxxx>
Date: Sun, 16 May 2004 23:44:29 +0200

Matthew Dillon wrote:

:If a module is loaded via a
:
:something_load="YES"
:
: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 :module(9)?


It should be, yes.

Hmmm...


consider the attached patch. I apply it and put

vesa_load="YES"

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.

Regards,
Sascha

--
http://yoyodyne.ath.cx
--- /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);
 #endif
 
+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();


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