From owner-freebsd-doc@FreeBSD.ORG Fri Feb 25 11:10:38 2005 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C53F116A4CE for ; Fri, 25 Feb 2005 11:10:38 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5ADDB43D4C for ; Fri, 25 Feb 2005 11:10:38 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j1PBAckc051032 for ; Fri, 25 Feb 2005 11:10:38 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j1PBAc8a051031; Fri, 25 Feb 2005 11:10:38 GMT (envelope-from gnats) Resent-Date: Fri, 25 Feb 2005 11:10:38 GMT Resent-Message-Id: <200502251110.j1PBAc8a051031@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "ALeine" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 196F316A4CE for ; Fri, 25 Feb 2005 11:09:39 +0000 (GMT) Received: from marlena.vvi.at (marlena.vvi.at [208.252.225.59]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75C7443D31 for ; Fri, 25 Feb 2005 11:09:38 +0000 (GMT) (envelope-from www@marlena.vvi.at) Received: from marlena.vvi.at (localhost.marlena.vvi.at [127.0.0.1]) by marlena.vvi.at (8.12.10/8.12.9) with ESMTP id j1OFEKoH055918 for ; Thu, 24 Feb 2005 07:14:24 -0800 (PST) (envelope-from www@marlena.vvi.at) Received: (from www@localhost) by marlena.vvi.at (8.12.10/8.12.10/Submit) id j1OFEERH055917; Thu, 24 Feb 2005 07:14:14 -0800 (PST) (envelope-from www) Message-Id: <200502241514.j1OFEERH055917@marlena.vvi.at> Date: Thu, 24 Feb 2005 07:14:14 -0800 (PST) From: "ALeine" To: FreeBSD-gnats-submit@FreeBSD.org Subject: docs/78062: Sample Echo Pseudo-Device Driver for FreeBSD 4.X doesn't compile X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 11:10:39 -0000 >Number: 78062 >Category: docs >Synopsis: Sample Echo Pseudo-Device Driver for FreeBSD 4.X doesn't compile >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Feb 25 11:10:38 GMT 2005 >Closed-Date: >Last-Modified: >Originator: ALeine >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD 4.11-STABLE #0: Tue Feb 22 18:15:21 CET 2005 aleine@aleine:/usr/src/sys/compile/ALEINE >Description: A `typedef' is missing. >How-To-Repeat: # cc -O -pipe -D_KERNEL -Wall -Wredundant-decls -Wnested-externs \ -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline \ -Wcast-qual -fformat-extensions -ansi -DKLD_MODULE -nostdinc -I- \ -I. -I@ -I@/../include -mpreferred-stack-boundary=2 -Wall \ -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ -fformat-extensions -ansi -c echodev.c echodev.c:54: syntax error before `*' echodev.c:54: warning: type defaults to `int' in declaration of `echomsg' echodev.c:54: warning: data definition has no type or storage class echodev.c: In function `echo_loader': echodev.c:78: syntax error before `)' echodev.c: In function `echo_read': echodev.c:125: request for member `len' in something not a structure or union echodev.c:126: request for member `len' in something not a structure or union echodev.c:126: request for member `len' in something not a structure or union echodev.c:126: request for member `len' in something not a structure or union echodev.c:127: request for member `msg' in something not a structure or union echodev.c:119: warning: `amt' might be used uninitialized in this function echodev.c: In function `echo_write': echodev.c:144: request for member `msg' in something not a structure or union echodev.c:148: request for member `msg' in something not a structure or union echodev.c:149: request for member `len' in something not a structure or union echodev.c: At top level: echodev.c:52: warning: `len' defined but not used *** Error code 1 >Fix: --- en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.sgml.old Thu Feb 24 \ 16:25:19 2005 +++ en_US.ISO8859-1/books/arch-handbook/driverbasics/chapter.sgml Thu Feb 24 \ 16:27:34 2005 @@ -185,6 +185,8 @@ * Simple `echo' pseudo-device KLD * * Murray Stokely + * + * Corrected by ALeine */ #define MIN(a,b) (((a) < (b)) ? (a) : (b)) @@ -225,7 +227,7 @@ -1 }; -struct s_echo { +typedef struct s_echo { char msg[BUFFERSIZE]; int len; } t_echo; ___________________________________________________________________ WebMail FREE http://mail.austrosearch.net >Release-Note: >Audit-Trail: >Unformatted: