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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message