Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2004 14:50:52 +0300
From:      Iasen Kostov <tbyte@OTEL.net>
To:        vxp <vxp@digital-security.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: help with a module, please..
Message-ID:  <4145899C.6040800@OTEL.net>
In-Reply-To: <20040910212926.V2370@digital-security.org>
References:  <20040910212926.V2370@digital-security.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@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" ... :)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4145899C.6040800>