Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2000 13:47:47 -0400 (EDT)
From:      Marc Tardif <intmktg@CAM.ORG>
To:        freebsd-questions@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   kld/cdev won't compile
Message-ID:  <Pine.LNX.4.10.10009291342430.16299-100000@Gloria.CAM.ORG>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10009291342430.16299-100000>