From owner-freebsd-doc@FreeBSD.ORG Wed Aug 20 05:50:21 2003 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 37CB616A4BF for ; Wed, 20 Aug 2003 05:50:21 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B96AD43F85 for ; Wed, 20 Aug 2003 05:50:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h7KCoJUp015134 for ; Wed, 20 Aug 2003 05:50:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h7KCoJBB015133; Wed, 20 Aug 2003 05:50:19 -0700 (PDT) Resent-Date: Wed, 20 Aug 2003 05:50:19 -0700 (PDT) Resent-Message-Id: <200308201250.h7KCoJBB015133@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, Igor Ahmetov Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3291416A4BF for ; Wed, 20 Aug 2003 05:43:06 -0700 (PDT) Received: from aps.mark-itt.ru (aps.mark-itt.ru [217.14.192.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6247143FE0 for ; Wed, 20 Aug 2003 05:43:03 -0700 (PDT) (envelope-from ahmetov@rain.ifmo.ru) Received: from [217.14.193.194] (HELO localhost.my.domain) by aps.mark-itt.ru (CommuniGate Pro SMTP 4.0.6) with ESMTP-TLS id 56137332 for FreeBSD-gnats-submit@freebsd.org; Wed, 20 Aug 2003 17:42:48 +0500 Received: from igor by localhost.my.domain with local (Exim 4.20) id 124EDE-0000de-VA for FreeBSD-gnats-submit@freebsd.org; Sat, 01 Jan 2000 05:24:12 +0300 Message-Id: From: Igor Ahmetov Sender: Igor Ahmetov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/55805: a little correction to the arch-handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Igor Ahmetov List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Wed, 20 Aug 2003 12:50:21 -0000 X-Original-Date: Sat, 01 Jan 2000 05:24:12 +0300 X-List-Received-Date: Wed, 20 Aug 2003 12:50:21 -0000 >Number: 55805 >Category: docs >Synopsis: a little correction to the arch-handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 20 05:50:18 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Igor Ahmetov >Release: FreeBSD 5.1-CURRENT i386 >Organization: >Environment: System: FreeBSD localhost.my.domain 5.1-CURRENT FreeBSD 5.1-CURRENT #4: Mon Aug 18 22:25:50 MSD 2003 root@localhost.my.domain:/usr/obj/usr/src/sys/CUSTOM i386 >Description: Looking into the example in section 13.4 of the arch-handbook (driverbasics/chapter.sgml), we see a declaration: typedef struct s_echo { char msg[BUFFERSIZE]; int len; } t_echo; And later, in function echo_write, the following statement: *(echomsg->msg + MIN(uio->uio_iov->iov_len,BUFFERSIZE)) = 0; So isn't it more correct to declare member msg of struct s_echo as char msg[BUFFERSIZE + 1]? >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: