Date: Fri, 10 Sep 2004 21:34:19 -0400 (EDT) From: vxp <vxp@digital-security.org> To: freebsd-hackers@freebsd.org Subject: help with a module, please.. Message-ID: <20040910212926.V2370@digital-security.org>
next in thread | raw e-mail | index | archive | help
hi this is another one of my possibly lame questions.. so i wrote a module, it compiles with a few warnings (was too lazy to put func prototypes, so it outputs warnings about that). among other things, the compilation produces an icmp.ko (name of my mod) but when i try to do kldload ./icmp.ko it tells me: digital-security# kldload icmp.kld kldload: can't load icmp.kld: No such file or directory digital-security# ls -l icmp.* -rw-r--r-- 1 vxp vxp 12702 Sep 10 21:28 icmp.c -rw-r--r-- 1 vxp vxp 5276 Sep 10 21:31 icmp.kld -rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko -rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o digital-security# what gives? :) may be i screwed up, somehow, in my load_handler? static int load_handler(module_t mod, int what, void *arg) { variable declarations here.. case MOD_LOAD: blah blah blah break; case MOD_UNLOAD: blah blah blah break; default: err = EINVAL; break; } return(err); } static moduledata_t icmp_mod = { "RebootByICMP", load_handler, NULL }; DECLARE_MODULE(icmp, icmp_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); any help appreciated :) can post full src, if needed.. thanks, Val
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040910212926.V2370>