help with a module, please..
Iasen Kostov
tbyte at OTEL.net
Mon Sep 13 04:51:10 PDT 2004
vxp wrote:
>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
>_______________________________________________
>freebsd-hackers at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>
>
>
Don't be fooled by the message "No such file or directory" - it's a
problem with the module itself (that sym "min") - and the kldload alway
says "No such file or directory" ... :)
More information about the freebsd-hackers
mailing list