From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 15 09:27:00 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4189D37B401 for ; Fri, 15 Aug 2003 09:27:00 -0700 (PDT) Received: from ns.webtt.biz (ns.webtt.biz [64.239.29.225]) by mx1.FreeBSD.org (Postfix) with SMTP id 44C7743F85 for ; Fri, 15 Aug 2003 09:26:57 -0700 (PDT) (envelope-from rui@ruilopes.com) Received: (qmail 99571 invoked from network); 15 Aug 2003 16:29:07 -0000 Received: from unknown (HELO ?217.129.149.167?) (rui@ruilopes.com@217.129.149.167) by ns.webtt.biz with SMTP; 15 Aug 2003 16:29:07 -0000 From: Rui Lopes To: Soeren Straarup In-Reply-To: <20030815132308.K71513-200000@x12.dk> References: <20030815132308.K71513-200000@x12.dk> Content-Type: text/plain Message-Id: <1060964980.1425.18.camel@localhost> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 15 Aug 2003 17:29:40 +0100 Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: about the arch-handbook X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Aug 2003 16:27:00 -0000 On Sex, 2003-08-15 at 12:28, Soeren Straarup wrote: > Hi > > I have tried to compile the echo psuedo-driver written by Murray Stokeley > under 5.X, first i compared it with the dev/null src in the src tree and > found that the cdevsw where defined in a little different way. > But i cannot find where in the there is some thign wrong this is the > make output > > xride@ip8:/root/c/echo# make > Warning: Object directory not changed from original /root/c/echo > cc -O -pipe -mcpu=pentiumpro -D_KERNEL -Wall -Wredundant-decls > - -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > - -Winline -Wcast-qual -fformat-extensions -std=c99 -DKLD_MODULE -nostdinc > - -I- -I. -I@ -I@/dev -I@/../include -fno-common -mno-align-long-strings > - -mpreferred-stack-boundary=2 -ffreestanding -Wall -Wredundant-decls > - -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith > - -Winline -Wcast-qual -fformat-extensions -std=c99 -c echobuffer.c > echobuffer.c:91: conflicting types for `echo_open' > echobuffer.c:24: previous declaration of `echo_open' > echobuffer.c:100: conflicting types for `echo_close' > echobuffer.c:25: previous declaration of `echo_close' > echobuffer.c:48: warning: `len' defined but not used > *** Error code 1 You should use `thread' (and not `proc') type in the last argument of echo_open and echo_close. from sys/conf.h: typedef int d_open_t(dev_t dev, int oflags, int devtype, struct thread *td); typedef int d_close_t(dev_t dev, int fflag, int devtype, struct thread *td); ^^^^^^ btw, there is a little bug in that example code, check: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/55445 Regards, Rui Lopes