Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 15:29:54 -0400 (EDT)
From:      "Andrew R. Reiter" <arr@watson.org>
To:        Marc Tardif <intmktg@CAM.ORG>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: kld/cdev won't compile
Message-ID:  <Pine.NEB.3.96L.1000929152853.26541A-100000@fledge.watson.org>
In-Reply-To: <Pine.LNX.4.10.10009291342430.16299-100000@Gloria.CAM.ORG>

next in thread | previous in thread | raw e-mail | index | archive | help

Marc,

Yes... This is known.  I know I sent in a send-pr awhile back.. but it's
not a big priority, in my opinion.  HOWEVER, you can see working examples
and a tutorial at:

  http://www.subterrain.net/~awr/KLD-Tutorial/intro.html

This will also be in daemonnews on the 1st.

Andrew


On Fri, 29 Sep 2000, Marc Tardif wrote:

> I'm currently running 4.1-RELEASE and can't compile the code in:
> /usr/share/examples/kld/cdev/module
> 
> The command "make" returns the following to stderr:
> cdevmod.c:142: macro `DEV_MODULE' used with too many (6) args
> cdevmod.c:84: `nostop' undeclared here (not in a function)
> cdevmod.c:84: initializer element is not constant
> cdevmod.c:84: (near initialization for `my_devsw.d_poll')
> cdevmod.c:85: `noreset' undeclared here (not in a function)
> cdevmod.c:85: initializer element is not constant
> cdevmod.c:85: (near initialization for `my_devsw.d_mmap')
> cdevmod.c:86: `nodevtotty' undeclared here (not in a function)
> cdevmod.c:86: initializer element is not constant
> cdevmod.c:86: (near initialization for `my_devsw.d_strategy')
> cdevmod.c:87: warning: initialization from incompatible pointer type
> cdevmod.c:88: warning: initialization makes integer from pointer without a cast
> cdevmod.c:89: warning: initialization from incompatible pointer type
> cdevmod.c:90: warning: initialization from incompatible pointer type
> cdevmod.c:91: `noparms' undeclared here (not in a function)
> cdevmod.c:91: initializer element is not constant
> cdevmod.c:91: (near initialization for `my_devsw.d_flags')
> cdevmod.c:93: warning: excess elements in struct initializer
> cdevmod.c:93: warning: (near initialization for `my_devsw')
> cdevmod.c:94: warning: excess elements in struct initializer
> cdevmod.c:94: warning: (near initialization for `my_devsw')
> cdevmod.c:95: warning: excess elements in struct initializer
> cdevmod.c:95: warning: (near initialization for `my_devsw')
> cdevmod.c:96: warning: excess elements in struct initializer
> cdevmod.c:96: warning: (near initialization for `my_devsw')
> cdevmod.c:98: warning: excess elements in struct initializer
> cdevmod.c:98: warning: (near initialization for `my_devsw')
> cdevmod.c:142: warning: initialization makes pointer from integer without a cast
> cdevmod.c:142: warning: initialization makes pointer from integer without a cast
> cdevmod.c:78: warning: `my_devsw' defined but not used
> cdevmod.c:113: warning: `cdev_load' defined but not used
> 
> Also, "grep include cdevmod.c" returns:
> #include <sys/param.h>
> #include <sys/systm.h>
> #include <sys/kernel.h>
> #include <sys/module.h>
> #include <sys/conf.h>
> #include "cdev.h"
> 
> but none of those include files contain "nostop", "noreset", etc.
> As for DEV_MODULES, the code in /usr/src/sys only uses 3 args, so
> I'm stumped on that one. Suggestions to solve these problems
> would be most appreciated.
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 

*-------------.................................................
| Andrew R. Reiter 
| arr@fledge.watson.org
| "It requires a very unusual mind
|   to undertake the analysis of the obvious" -- A.N. Whitehead



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1000929152853.26541A-100000>