From owner-freebsd-hackers Fri Sep 29 12:41:29 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 29A3637B651; Fri, 29 Sep 2000 12:41:24 -0700 (PDT) Received: from localhost (arr@localhost) by fledge.watson.org (8.9.3/8.9.3) with SMTP id PAA26543; Fri, 29 Sep 2000 15:29:54 -0400 (EDT) (envelope-from arr@watson.org) Date: Fri, 29 Sep 2000 15:29:54 -0400 (EDT) From: "Andrew R. Reiter" To: Marc Tardif Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: kld/cdev won't compile In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 > #include > #include > #include > #include > #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